Qt 4.8
|
The ParentAnimation element animates changes in parent values. More...
The ParentAnimation element animates changes in parent values.
ParentAnimation is used to animate a parent change for an Item .
For example, the following ParentChange changes blueRect
to become a child of redRect
when it is clicked. The inclusion of the ParentAnimation, which defines a NumberAnimation to be applied during the transition, ensures the item animates smoothly as it moves to its new parent:
A ParentAnimation can contain any number of animations. These animations will be run in parallel; to run them sequentially, define them within a SequentialAnimation.
In some cases, such as when reparenting between items with clipping enabled, it is useful to animate the parent change via another item that does not have clipping enabled. Such an item can be set using the via property.
For convenience, when a ParentAnimation is used in a Transition , it will animate any ParentChange that has occurred during the state change. This can be overridden by setting a specific target item using the target property.
Like any other animation element, a ParentAnimation can be applied in a number of ways, including transitions, behaviors and property value sources. The QML Animation and Transitions documentation shows a variety of methods for creating animations.