summaryrefslogtreecommitdiffstats
path: root/examples/declarative/dynamic/qml/PerspectiveItem.qml
diff options
context:
space:
mode:
authorYann Bodson <yann.bodson@nokia.com>2009-10-30 03:36:19 (GMT)
committerYann Bodson <yann.bodson@nokia.com>2009-10-30 03:36:19 (GMT)
commitf37e9d787bd418d8f75997a8d46c1c42e842c673 (patch)
tree8e11076675fa02740d5d5ca490b5dc09adc16bdf /examples/declarative/dynamic/qml/PerspectiveItem.qml
parent72932c6683729071c1acb3f4832c5dc53a561bdd (diff)
downloadQt-f37e9d787bd418d8f75997a8d46c1c42e842c673.zip
Qt-f37e9d787bd418d8f75997a8d46c1c42e842c673.tar.gz
Qt-f37e9d787bd418d8f75997a8d46c1c42e842c673.tar.bz2
cleanup
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
+}