forked from qt-creator/qt-creator
Doc: Describe Qt Quick Animation types
They are now available in Library > Qt Quick - Animation Change-Id: I67c3c9299c80fb464cbfca3523843807127a5250 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user