From b2ca79836b653c4daedc58db132732f07f7432d6 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Fri, 3 Apr 2020 15:42:49 +0200 Subject: [PATCH] Doc: Describe Qt Quick Animation types They are now available in Library > Qt Quick - Animation Change-Id: I67c3c9299c80fb464cbfca3523843807127a5250 Reviewed-by: Thomas Hartmann --- doc/qtcreator/src/qtquick/qtquick-states.qdoc | 51 +++++++++++++++---- 1 file changed, 41 insertions(+), 10 deletions(-) diff --git a/doc/qtcreator/src/qtquick/qtquick-states.qdoc b/doc/qtcreator/src/qtquick/qtquick-states.qdoc index d836643191e..27c287bb584 100644 --- a/doc/qtcreator/src/qtquick/qtquick-states.qdoc +++ b/doc/qtcreator/src/qtquick/qtquick-states.qdoc @@ -156,18 +156,49 @@ \section1 Animating Transitions Between States - To make movement between states smooth, you can specify transitions. You can - use different types of animated transitions. For example, you can animate - changes to property values and colors. You can use rotation animation to - control the direction of rotation. For more information, see - \l{Animation and Transitions in Qt Quick}. + To make movement between states smooth, you can animate transitions. + Animations are created by applying animation types to property values. + Animation types interpolate property values to create smooth transitions. + As well, state transitions may assign animations to state changes. - You can use the \c ParallelAnimation type to start several animations at - the same time. Or use the \c SequentialAnimation type to run them one - after another. + To create an animation, use an appropriate animation type for the type of + the property that is to be animated, and apply the animation depending on + the type of behavior that is required. + + You can drag and drop the following QML types from \uicontrol Library + > \uicontrol {QML Types} > \uicontrol {Qt Quick - Animation} to the + \uicontrol Navigator or \uicontrol {Form Editor}: + + \list + \li \l [QML] {ColorAnimation}{Color Animation} is a specialized + property animation that defines an animation to be applied when a + color value changes. + \li \l [QML] {NumberAnimation}{Number Animation} is a specialized + property animation that defines an animation to be applied when a + numerical value changes. + \li \l [QML] {ParallelAnimation}{Parallel Animation} enables + animations to be run in parallel. + \li \l [QML] {PauseAnimation}{Pause Animation} is used in a + sequential animation to create a step where nothing happens, for + a specified duration. + \li \l [QML] {PropertyAction}{Property Action} immediately changes + a propertyvalue during an animation, without animating the property + change. + \li \l [QML] {PropertyAnimation}{Property Animation} animates + changes in thevalue of a property. + \li \l [QML] {ScriptAction}{Script Action} defines scripts to be + run during an animation. + \li \l [QML] {SequentialAnimation}{Sequential Animation} enables + animations to be run sequentially. + \endlist + + For more information, see \l{Animation and Transitions in Qt Quick}. + + \if defined(qtcreator) + For an example of assigning number animations to states, see + \l {Creating a Qt Quick Application}. + \endif - You can use the \uicontrol {Text Editor} to specify transitions. For more - information, see \l{Transition}. Alternatively, you can use the \uicontrol Timeline view to animate the properties of UI components and to bind the animations to states. For more