Initial import from the monolithic Qt.
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / qdeclarativestates / data / parentChange6.qml
1 import QtQuick 1.0
2
3 Rectangle {
4     width: 400; height: 400
5     Rectangle {
6         id: myRect
7         objectName: "MyRect"
8         x: 5; y: 5
9         width: 100; height: 100
10         color: "red"
11     }
12     MouseArea {
13         id: clickable
14         anchors.fill: parent
15     }
16
17     Item {
18         id: newParent
19         rotation: 180
20     }
21
22     states: State {
23         name: "reparented"
24         when: clickable.pressed
25         ParentChange {
26             target: myRect
27             parent: newParent
28         }
29     }
30 }