diff options
Diffstat (limited to 'doc/src/declarative/animation.qdoc')
-rw-r--r-- | doc/src/declarative/animation.qdoc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/doc/src/declarative/animation.qdoc b/doc/src/declarative/animation.qdoc index 2b75211..7e0a787 100644 --- a/doc/src/declarative/animation.qdoc +++ b/doc/src/declarative/animation.qdoc @@ -58,7 +58,8 @@ types listed above. If the property you are animating is a number or color, you NumberAnimation or ColorAnimation. These elements don't add any additional functionality, but will help enforce type correctness and are slightly more efficient. -A property animation can be specified as a value source. This is especially useful for repeating animations. +A property animation can be specified as a value source using the \e Animation \bold on \e property syntax. This is especially useful +for repeating animations. The following example creates a bouncing effect: \qml @@ -70,7 +71,7 @@ Rectangle { source: "qt-logo.png" x: 60-img.width/2 y: 0 - y: SequentialAnimation { + SequentialAnimation on y { repeat: true NumberAnimation { to: 200-img.height; easing.type: "OutBounce"; duration: 2000 } PauseAnimation { duration: 1000 } @@ -93,7 +94,7 @@ Rectangle { Rectangle { color: "red" width: 50; height: 50 - x: NumberAnimation { to: 50; } + NumberAnimation on x { to: 50; } } } \endqml @@ -226,7 +227,7 @@ Rectangle { id: redRect color: "red" width: 100; height: 100 - x: Behavior { NumberAnimation { duration: 300; easing.type: "InOutQuad" } } + Behavior on x { NumberAnimation { duration: 300; easing.type: "InOutQuad" } } } \endqml |