Initial import from the monolithic Qt.
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / qdeclarativestates / data / anchorChanges4.qml
1 import QtQuick 1.0
2
3 Rectangle {
4     width: 200; height: 200
5     Rectangle {
6         id: myRect
7         objectName: "MyRect"
8         color: "green";
9         anchors.horizontalCenter: parent.horizontalCenter
10         anchors.verticalCenter: parent.verticalCenter
11     }
12     Item { objectName: "LeftGuideline"; id: leftGuideline; x: 10 }
13     Item { objectName: "BottomGuideline"; id: bottomGuideline; y: 150 }
14     states: State {
15         name: "reanchored"
16         AnchorChanges {
17             target: myRect;
18             anchors.horizontalCenter: bottomGuideline.horizontalCenter
19             anchors.verticalCenter: leftGuideline.verticalCenter
20         }
21     }
22 }