QParallelAnimationGroup Class

The QParallelAnimationGroup class provides a parallel group of animations. More...

Header: #include <QParallelAnimationGroup>
qmake: QT += core
Since: Qt 4.6
Inherits: QAnimationGroup

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

Additional Inherited Members

Detailed Description

The QParallelAnimationGroup class provides a parallel group of animations.

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;


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] QParallelAnimationGroup::~QParallelAnimationGroup()

Destroys the animation group. It will also destroy all its animations.

[override virtual] int QParallelAnimationGroup::duration() const

Reimplemented from QAbstractAnimation::duration().

[override virtual protected] bool QParallelAnimationGroup::event(QEvent *event)

Reimplemented from QAnimationGroup::event().

[override virtual protected] void QParallelAnimationGroup::updateCurrentTime(int currentTime)

Reimplemented from QAbstractAnimation::updateCurrentTime().

[override virtual protected] void QParallelAnimationGroup::updateDirection(QAbstractAnimation::Direction direction)

Reimplemented from QAbstractAnimation::updateDirection().

[override virtual protected] void QParallelAnimationGroup::updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState)

Reimplemented from QAbstractAnimation::updateState().

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
create apps
create games
cross platform
native performance
3rd party services
game network
level editor
easiest to learn
biggest time saving
best support