diff options
author | Qt by Nokia <qt-info@nokia.com> | 2011-04-27 12:05:43 +0200 |
---|---|---|
committer | axis <qt-info@nokia.com> | 2011-04-27 12:05:43 +0200 |
commit | 885735d011472bcfbb96e688d9e64553d7fe9d4b (patch) | |
tree | 734963625eba643bf11bc4870a4c407809a6400a /tests/auto/declarative/qmlvisual/animation/parallelAnimation/parallelAnimation-visual.qml |
Initial import from the monolithic Qt.
This is the beginning of revision history for this module. If you
want to look at revision history older than this, please refer to the
Qt Git wiki for how to use Git history grafting. At the time of
writing, this wiki is located here:
http://qt.gitorious.org/qt/pages/GitIntroductionWithQt
If you have already performed the grafting and you don't see any
history beyond this commit, try running "git log" with the "--follow"
argument.
Branched from the monolithic repo, Qt master branch, at commit
896db169ea224deb96c59ce8af800d019de63f12
Diffstat (limited to 'tests/auto/declarative/qmlvisual/animation/parallelAnimation/parallelAnimation-visual.qml')
-rw-r--r-- | tests/auto/declarative/qmlvisual/animation/parallelAnimation/parallelAnimation-visual.qml | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/tests/auto/declarative/qmlvisual/animation/parallelAnimation/parallelAnimation-visual.qml b/tests/auto/declarative/qmlvisual/animation/parallelAnimation/parallelAnimation-visual.qml new file mode 100644 index 0000000000..6974adbc33 --- /dev/null +++ b/tests/auto/declarative/qmlvisual/animation/parallelAnimation/parallelAnimation-visual.qml @@ -0,0 +1,52 @@ +import QtQuick 1.0 + +/* + This test verifies that a single animation animating two properties is visually the same as two + animations in a parallel group animating the same properties. Visually, you should see a red + rectangle at 0,0 stretching from the top of the window to the bottom. This rect will be moved to + the right side of the window while turning purple. If the bottom half is visually different + than the top half, there is a problem. +*/ + +Rectangle { + width: 200; height: 100 + Rectangle { + id: redRect + width: 50; height: 50 + color: "red" + } + Rectangle { + id: redRect2 + width: 50; height: 50 + y: 50 + color: "red" + } + + Timer{ + interval: 100 + running: true + onTriggered: parent.state = "state1" + } + + states: State { + name: "state1" + PropertyChanges { + target: redRect + x: 150 + color: "purple" + } + PropertyChanges { + target: redRect2 + x: 150 + color: "purple" + } + } + + transitions: Transition { + PropertyAnimation { targets: redRect; properties: "x,color"; duration: 300 } + ParallelAnimation { + NumberAnimation { targets: redRect2; properties: "x"; duration: 300 } + ColorAnimation { targets: redRect2; properties: "color"; duration: 300 } + } + } +} |