QParallelAnimationGroup Class
The QParallelAnimationGroup class provides a parallel group of animations. More...
Header: | #include <QParallelAnimationGroup> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Core) target_link_libraries(mytarget PRIVATE Qt6::Core) |
qmake: | QT += core |
Inherits: | QAnimationGroup |
- List of all members, including inherited members
- QParallelAnimationGroup is part of Animation Framework.
Public Functions
QParallelAnimationGroup(QObject *parent = nullptr) | |
virtual | ~QParallelAnimationGroup() |
Reimplemented Public Functions
virtual int | duration() const override |
Reimplemented Protected Functions
virtual bool | event(QEvent *event) override |
virtual void | updateCurrentTime(int currentTime) override |
virtual void | updateDirection(QAbstractAnimation::Direction direction) override |
virtual void | updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState) override |
Detailed Description
QParallelAnimationGroup–a container for animations–starts all its animations when it is started itself, i.e., runs all animations in parallel. The animation group finishes when the longest lasting animation has finished.
You can treat QParallelAnimationGroup as any other QAbstractAnimation, e.g., pause, resume, or add it to other animation groups.
QParallelAnimationGroup *group = new QParallelAnimationGroup; group->addAnimation(anim1); group->addAnimation(anim2); group->start();
In this example, anim1
and anim2
are two QPropertyAnimations that have already been set up.
See also QAnimationGroup, QPropertyAnimation, and The Animation Framework.
Member Function Documentation
QParallelAnimationGroup::QParallelAnimationGroup(QObject *parent = nullptr)
Constructs a QParallelAnimationGroup. parent is passed to QObject's constructor.
[virtual noexcept]
QParallelAnimationGroup::~QParallelAnimationGroup()
Destroys the animation group. It will also destroy all its animations.
[override virtual]
int QParallelAnimationGroup::duration() const
Reimplements: QAbstractAnimation::duration() const.
[override virtual protected]
bool QParallelAnimationGroup::event(QEvent *event)
Reimplements: QAnimationGroup::event(QEvent *event).
[override virtual protected]
void QParallelAnimationGroup::updateCurrentTime(int currentTime)
Reimplements: QAbstractAnimation::updateCurrentTime(int currentTime).
[override virtual protected]
void QParallelAnimationGroup::updateDirection(QAbstractAnimation::Direction direction)
Reimplements: QAbstractAnimation::updateDirection(QAbstractAnimation::Direction direction).
[override virtual protected]
void QParallelAnimationGroup::updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState)
Reimplements: QAbstractAnimation::updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState).
© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.