summaryrefslogtreecommitdiffstats
path: root/examples/declarative/dynamic/qml/PerspectiveItem.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative/dynamic/qml/PerspectiveItem.qml')
-rw-r--r--examples/declarative/dynamic/qml/PerspectiveItem.qml12
1 files changed, 12 insertions, 0 deletions
diff --git a/examples/declarative/dynamic/qml/PerspectiveItem.qml b/examples/declarative/dynamic/qml/PerspectiveItem.qml
new file mode 100644
index 0000000..9e09dd2
--- /dev/null
+++ b/examples/declarative/dynamic/qml/PerspectiveItem.qml
@@ -0,0 +1,12 @@
+import Qt 4.6
+
+Image {
+ id: tree
+ property bool created: false
+ opacity: y+height > window.height/2 ? 1 : 0.25
+ onCreatedChanged: if (created && y+height<=window.height/2) { tree.destroy() }
+ scale: y+height > window.height/2 ? (y+height-250)*0.01 : 1
+ transformOrigin: "Center"
+ source: image;
+ z: y
+}