tests/auto/declarative/qdeclarativebehaviors/data/reassignedAnimation.qml
changeset 30 5dc02b23752f
equal deleted inserted replaced
29:b72c6db6890b 30:5dc02b23752f
       
     1 import Qt 4.7
       
     2 Rectangle {
       
     3     width: 400
       
     4     height: 400
       
     5     Rectangle {
       
     6         id: rect
       
     7         objectName: "MyRect"
       
     8         width: 100; height: 100; color: "green"
       
     9         Behavior on x {
       
    10             objectName: "MyBehavior"
       
    11             NumberAnimation {id: na1; duration: 200 }
       
    12             NumberAnimation {id: na2; duration: 1000 }
       
    13         }
       
    14     }
       
    15     MouseArea {
       
    16         id: clicker
       
    17         anchors.fill: parent
       
    18     }
       
    19     states: State {
       
    20         name: "moved"
       
    21         when: clicker.pressed
       
    22         PropertyChanges {
       
    23             target: rect
       
    24             x: 200
       
    25         }
       
    26     }
       
    27 }