En esta página

QParallelAnimationGroup Class

La clase QParallelAnimationGroup proporciona un grupo paralelo de animaciones. Más...

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

Funciones Públicas

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

Funciones Públicas Reimplementadas

virtual int duration() const override

Funciones Protegidas Reimplementadas

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

Descripción Detallada

QParallelAnimationGroup-un container for animations-comienza todas sus animaciones cuando él mismo es started, es decir, ejecuta todas las animaciones en paralelo. El grupo de animación finaliza cuando la animación de mayor duración ha terminado.

Puedes tratar QParallelAnimationGroup como cualquier otro QAbstractAnimation, por ejemplo, pausarlo, reanudarlo o añadirlo a otros grupos de animación.

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

    group->start();

En este ejemplo, anim1 y anim2 son dos QPropertyAnimations que ya han sido configurados.

Ver también QAnimationGroup, QPropertyAnimation, y The Animation Framework.

Documentación de funciones miembro

QParallelAnimationGroup::QParallelAnimationGroup(QObject *parent = nullptr)

Construye un QParallelAnimationGroup. parent se pasa al constructor de QObject.

[virtual noexcept] QParallelAnimationGroup::~QParallelAnimationGroup()

Destruye el grupo de animación. También destruirá todas sus animaciones.

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

Reimplementa: QAbstractAnimation::duration() const.

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

Reimplementa: QAnimationGroup::event(QEvent *event).

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

Reimplementa: QAbstractAnimation::updateCurrentTime(int currentTime).

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

Reimplementa: QAbstractAnimation::updateDirection(QAbstractAnimation::Dirección direction).

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

Reimplementa: QAbstractAnimation::updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState).

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