QSequentialAnimationGroup Class▲
-
Header: QSequentialAnimationGroup
-
CMake:
find_package(Qt6 REQUIRED COMPONENTS Core)
target_link_libraries(mytarget PRIVATE Qt6::Core)
-
qmake: QT += core
-
Inherits: QAnimationGroup
-
Group: QSequentialAnimationGroup is part of Animation Framework
Detailed Description▲
QSequentialAnimationGroup is a QAnimationGroup that runs its animations in sequence, i.e., it starts one animation after another has finished playing. The animations are played in the order they are added to the group (using addAnimation() or insertAnimation()). The animation group finishes when its last animation has finished.
At each moment there is at most one animation that is active in the group; it is returned by currentAnimation(). An empty group has no current animation.
A sequential animation group can be treated as any other animation, i.e., it can be started, stopped, and added to other groups. You can also call addPause() or insertPause() to add a pause to a sequential animation group.
QSequentialAnimationGroup *
group =
new
QSequentialAnimationGroup;
group-&
gt;addAnimation(anim1);
group-&
gt;addAnimation(anim2);
group-&
gt;start();
In this example, anim1 and anim2 are two already set up QPropertyAnimations.
See Also▲
Property Documentation▲
[bindable read-only] currentAnimation : QAbstractAnimation*▲
This property supports QProperty bindings.
This property holds the animation in the current time.
Member Function Documentation▲
QSequentialAnimationGroup::QSequentialAnimationGroup(QObject *parent = nullptr)▲
Constructs a QSequentialAnimationGroup. parent is passed to QObject's constructor.
[virtual] QSequentialAnimationGroup::~QSequentialAnimationGroup()▲
Destroys the animation group. It will also destroy all its animations.
QPauseAnimation *QSequentialAnimationGroup::addPause(int msecs)▲
Adds a pause of msecs to this animation group. The pause is considered as a special type of animation, thus animationCount will be increased by one.
See Also▲
See also insertPause(), QAnimationGroup::addAnimation()
void QSequentialAnimationGroup::currentAnimationChanged(QAbstractAnimation *current)▲
QSequentialAnimationGroup emits this signal when currentAnimation has been changed. current is the current animation.
Notifier signal for property currentAnimation.
See Also▲
See also currentAnimation()
[override virtual] int QSequentialAnimationGroup::duration() const▲
Reimplements: QAbstractAnimation::duration() const.
[override virtual protected] bool QSequentialAnimationGroup::event(QEvent *event)▲
Reimplements: QAnimationGroup::event(QEvent *event).
QPauseAnimation *QSequentialAnimationGroup::insertPause(int index, int msecs)▲
Inserts a pause of msecs milliseconds at index in this animation group.
See Also▲
See also addPause(), QAnimationGroup::insertAnimation()
[override virtual protected] void QSequentialAnimationGroup::updateCurrentTime(int currentTime)▲
Reimplements: QAbstractAnimation::updateCurrentTime(int currentTime).