6.0.0-rc4Source

QParallelAnimationGroup Class

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

Header#include <QParallelAnimationGroup>
CMaketarget_link_libraries(app PRIVATE Nt::Core)
ModuleNt Core C++ Classes
Since4.6
InheritsQAnimationGroup

List of all members, including inherited members

Public Functions

Reimplemented Public Functions

intduration() const

Reimplemented Protected Functions

Detailed Description

A parallel group starts all its animations when it starts and runs them together. The group is finished when the animation that takes longest is.

auto *group = new QParallelAnimationGroup;
group->addAnimation(new QPropertyAnimation(window, "geometry"));
group->addAnimation(new QPropertyAnimation(window, "windowOpacity"));
group->start();

See also QSequentialAnimationGroup and QAnimationGroup.

Differences from Qt

None.

Member Function Documentation

[explicit] QParallelAnimationGroup::QParallelAnimationGroup(QObject *parent = nullptr)

Constructs a parallel group with the given parent.

[override] QParallelAnimationGroup::~QParallelAnimationGroup()

Destroys the group and the animations in it.

[override] int QParallelAnimationGroup::duration() const

Reimplements QAnimationGroup::duration().

Returns the duration of the animation that takes longest, with its loops, or -1 if the duration of one of the animations is undefined.

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

Reimplements QAnimationGroup::event().

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

Reimplements QAnimationGroup::updateCurrentTime().

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

Reimplements QAnimationGroup::updateDirection().

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

Reimplements QAnimationGroup::updateState().