diff options
Diffstat (limited to 'tests/auto/declarative/visual/animation/bindinganimation/bindinganimation.qml')
-rw-r--r-- | tests/auto/declarative/visual/animation/bindinganimation/bindinganimation.qml | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/auto/declarative/visual/animation/bindinganimation/bindinganimation.qml b/tests/auto/declarative/visual/animation/bindinganimation/bindinganimation.qml new file mode 100644 index 0000000..1afd4cd --- /dev/null +++ b/tests/auto/declarative/visual/animation/bindinganimation/bindinganimation.qml @@ -0,0 +1,40 @@ +import Qt 4.6 + +Rectangle { + color: "blue" + width: 320 + height: 240 + id: Page + Rectangle { + id: MyRectangle + width: 100 + height: 100 + color: "red" + x: 10 + } + states: [ + State { + name: "hello" + PropertyChanges { + target: MyRectangle + x: 50 + 50 + } + PropertyChanges { + target: MyMouseRegion + onClicked: Page.state = '' + } + } + ] + transitions: [ + Transition { + NumberAnimation { + matchProperties: "x" + } + } + ] + MouseRegion { + id: MyMouseRegion + anchors.fill: parent + onClicked: { Page.state= 'hello' } + } +} |