Initial import from the monolithic Qt.
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / qmlvisual / animation / bindinganimation / bindinganimation.qml
1 import QtQuick 1.0
2
3 Rectangle {
4     color: "blue"
5     width: 320
6     height: 240
7     id: page
8     Rectangle {
9         id: myRectangle
10         width: 100
11         height: 100
12         color: "red"
13         x: 10
14     }
15     states: [
16         State {
17             when: myMouseArea.pressed
18             name: "hello"
19             PropertyChanges {
20                 target: myRectangle
21                 x: 50 + 50
22             }
23         }
24     ]
25     transitions: [
26         Transition {
27             NumberAnimation {
28                 properties: "x"
29             }
30         }
31     ]
32     MouseArea {
33         id: myMouseArea
34         anchors.fill: parent
35     }
36 }