summaryrefslogtreecommitdiffstats
path: root/examples/declarative/dynamic/qml/PerspectiveItem.qml
blob: 55a70d5f19c6fc3fec91d18cb04c081c1e1686fa (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; smooth: true
    z: y
}