QParallelAnimationGroup Class

Die Klasse QParallelAnimationGroup bietet eine parallele Gruppe von Animationen. Mehr...

Kopfzeile: #include <QParallelAnimationGroup>
CMake: find_package(Qt6 REQUIRED COMPONENTS Core)
target_link_libraries(mytarget PRIVATE Qt6::Core)
qmake: QT += core
Vererbt: QAnimationGroup

Öffentliche Funktionen

QParallelAnimationGroup(QObject *parent = nullptr)
virtual ~QParallelAnimationGroup()

Reimplementierte öffentliche Funktionen

virtual int duration() const override

Reimplementierte geschützte Funktionen

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

Detaillierte Beschreibung

QParallelAnimationGroup-eine container for animations- startet alle ihre Animationen, wenn sie selbst started ist, d.h. sie führt alle Animationen parallel aus. Die Animationsgruppe wird beendet, wenn die am längsten andauernde Animation abgeschlossen ist.

Sie können QParallelAnimationGroup wie jede andere QAbstractAnimation behandeln, z. B. pausieren, fortsetzen oder zu anderen Animationsgruppen hinzufügen.

    QParallelAnimationGroup *group = new QParallelAnimationGroup;
    group->addAnimation(anim1);
    group->addAnimation(anim2);

    group->start();

In diesem Beispiel sind anim1 und anim2 zwei QPropertyAnimations, die bereits eingerichtet wurden.

Siehe auch QAnimationGroup, QPropertyAnimation, und The Animation Framework.

Dokumentation der Mitgliedsfunktionen

QParallelAnimationGroup::QParallelAnimationGroup(QObject *parent = nullptr)

Konstruiert eine QParallelAnimationGroup. parent wird an den Konstruktor von QObject übergeben.

[virtual noexcept] QParallelAnimationGroup::~QParallelAnimationGroup()

Zerstört die Animationsgruppe. Es werden auch alle ihre Animationen zerstört.

[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).

© 2025 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.