tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition6.qml
changeset 30 5dc02b23752f
equal deleted inserted replaced
29:b72c6db6890b 30:5dc02b23752f
       
     1 import Qt 4.7
       
     2 
       
     3 Rectangle {
       
     4     width: 400
       
     5     height: 400
       
     6     Rectangle {
       
     7         id: theRect
       
     8         objectName: "TheRect"
       
     9         color: "red"
       
    10         width: 50; height: 50
       
    11         x: 100; y: 100
       
    12     }
       
    13 
       
    14     states: State {
       
    15         name: "moved"
       
    16         PropertyChanges {
       
    17             target: theRect
       
    18             x: 200
       
    19         }
       
    20     }
       
    21     transitions: Transition {
       
    22         NumberAnimation { targets: theItem; properties: "x" }
       
    23     }
       
    24 
       
    25     MouseArea {
       
    26         anchors.fill: parent
       
    27         onClicked: parent.state = "moved"
       
    28     }
       
    29 }