tests/auto/declarative/qdeclarativestates/data/anchorChanges5.qml
changeset 30 5dc02b23752f
equal deleted inserted replaced
29:b72c6db6890b 30:5dc02b23752f
       
     1 import Qt 4.7
       
     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.baseline: parent.baseline
       
    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.baseline: leftGuideline.baseline
       
    20         }
       
    21     }
       
    22 }