tests/auto/declarative/qdeclarativestates/data/anchorChanges3.qml
changeset 30 5dc02b23752f
equal deleted inserted replaced
29:b72c6db6890b 30:5dc02b23752f
       
     1 import Qt 4.7
       
     2 
       
     3 Rectangle {
       
     4     id: container
       
     5     width: 200; height: 200
       
     6     Rectangle {
       
     7         id: myRect
       
     8         objectName: "MyRect"
       
     9         color: "green";
       
    10         anchors.left: parent.left
       
    11         anchors.right: rightGuideline.left
       
    12         anchors.top: topGuideline.top
       
    13         anchors.bottom: container.bottom
       
    14     }
       
    15     Item { objectName: "LeftGuideline"; id: leftGuideline; x: 10 }
       
    16     Item { id: rightGuideline; x: 150 }
       
    17     Item { id: topGuideline; y: 10 }
       
    18     Item { objectName: "BottomGuideline"; id: bottomGuideline; y: 150 }
       
    19     states: State {
       
    20         name: "reanchored"
       
    21         AnchorChanges {
       
    22             target: myRect;
       
    23             anchors.left: leftGuideline.left
       
    24             anchors.right: container.right
       
    25             anchors.top: container.top
       
    26             anchors.bottom: bottomGuideline.bottom
       
    27         }
       
    28     }
       
    29 }