summaryrefslogtreecommitdiffstats
path: root/examples/declarative/dynamic/qml/PerspectiveItem.qml
blob: 9e09dd2795dfa2d19b560b1a0b33fafa3ed0df5f (plain)
1
2
3
4
5
6
7
8
9
10
11
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
}