QAbstractAnimation Class

class Qt3DAnimation::QAbstractAnimation

An abstract base class for Qt3D animations. More...

Header: #include <QAbstractAnimation>
qmake: QT += 3danimation
Since: Qt 5.9
Instantiated By: AbstractAnimation
Inherited By:

Qt3DAnimation::QKeyframeAnimation, Qt3DAnimation::QMorphingAnimation, and Qt3DAnimation::QVertexBlendAnimation

This class was introduced in Qt 5.9.

Public Types

enum AnimationType { KeyframeAnimation, MorphingAnimation, VertexBlendAnimation }

Protected Functions

void setDuration(float duration)

Detailed Description

Qt3DAnimation::QAbstractAnimation is an abstract base class for all animations. Qt3DAnimation::QAbstractAnimation can not be directly instantiated, but rather through its subclasses. QAbstractAnimation specifies common properties for all Qt3D animations, such as animation name and type, current position and animation duration, while leaving the actual animating for the subclasses.

Member Type Documentation

enum QAbstractAnimation::AnimationType

This enumeration specifies the type of the animation

ConstantValueDescription
Qt3DAnimation::QAbstractAnimation::KeyframeAnimation1Simple keyframe animation implementation for QTransform
Qt3DAnimation::QAbstractAnimation::MorphingAnimation2Blend-shape morphing animation
Qt3DAnimation::QAbstractAnimation::VertexBlendAnimation3Vertex-blend animation

Member Function Documentation

[protected] void QAbstractAnimation::setDuration(float duration)

Sets the duration of the animation.