IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QAnimationGroup Class

A class grouping animations together.

This class was introduced in Qt 5.9.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QAnimationGroup Class

  • Header: QAnimationGroup

  • Since: Qt 5.9

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS 3danimation)

    target_link_libraries(mytarget PRIVATE Qt6::3danimation)

  • qmake: QT += 3danimation

  • Inherits: QObject

Detailed Description

Qt3DAnimation::QAnimationGroup class is used to group multiple animations so that they can act as one animation. The position set to the group is also set to all animations in a group. The duration is the maximum of the individual animations. The animations can be any supported animation type and do not have to have the same name.

Property Documentation

 

[read-only] duration : const float

Holds the maximum duration of the animations in the group.

Access functions:

  • float duration() const

Notifier signal:

  • void durationChanged(float duration)

name : QString

Holds the name of the animation group.

Access functions:

  • name() const

  • void setName(const &name)

Notifier signal:

  • void nameChanged(const &name)

position : float

Holds the animation position.

Access functions:

  • float position() const

  • void setPosition(float position)

Notifier signal:

  • void positionChanged(float position)

Member Function Documentation

 

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

Constructs an QAnimationGroup with parent.

void QAnimationGroup::addAnimation(Qt3DAnimation::QAbstractAnimation *animation)

Adds new animation to the group.

QList<Qt3DAnimation::QAbstractAnimation *> QAnimationGroup::animationList()

Returns the list of animations in the group.

void QAnimationGroup::removeAnimation(Qt3DAnimation::QAbstractAnimation *animation)

Removes animation from the group.

void QAnimationGroup::setAnimations(const QList<Qt3DAnimation::QAbstractAnimation *> &animations)

Sets the animations to the group. Old animations are removed.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+