diff options
Diffstat (limited to 'tests/auto/quick/qquickbehaviors/data/reassignedAnimation.qml')
-rw-r--r-- | tests/auto/quick/qquickbehaviors/data/reassignedAnimation.qml | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickbehaviors/data/reassignedAnimation.qml b/tests/auto/quick/qquickbehaviors/data/reassignedAnimation.qml new file mode 100644 index 0000000000..5731cb3efd --- /dev/null +++ b/tests/auto/quick/qquickbehaviors/data/reassignedAnimation.qml @@ -0,0 +1,32 @@ +import QtQuick 2.0 +Rectangle { + width: 400 + height: 400 + Rectangle { + id: rect + objectName: "MyRect" + width: 100; height: 100; color: "green" + Behavior on x { + id: myBehavior + objectName: "MyBehavior" + NumberAnimation {id: na1; duration: 200 } + } + } + MouseArea { + id: clicker + anchors.fill: parent + } + states: State { + name: "moved" + when: clicker.pressed + PropertyChanges { + target: rect + x: 200 + } + } + + NumberAnimation {id: na2; duration: 1000 } + Component.onCompleted: { + myBehavior.animation = na2; + } +} |