Auf dieser Seite

Qt3DAnimation::QAbstractAnimation Class

class Qt3DAnimation::QAbstractAnimation

Eine abstrakte Basisklasse für Qt3D-Animationen. Mehr...

Header: #include <QAbstractAnimation>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3danimation)
target_link_libraries(mytarget PRIVATE Qt6::3danimation)
qmake: QT += 3danimation
In QML: AbstractAnimation
Erbt von: QObject
Vererbt an:

Qt3DAnimation::QKeyframeAnimation, „ Qt3DAnimation::QMorphingAnimation “ sowie Qt3DAnimation::QVertexBlendAnimation

Status: Technologievorschau

Diese Klasse befindet sich in der Technologievorschau und kann sich noch ändern.

Öffentliche Typen

enum AnimationType { KeyframeAnimation, MorphingAnimation, VertexBlendAnimation }

Eigenschaften

Öffentliche Funktionen

QString animationName() const
Qt3DAnimation::QAbstractAnimation::AnimationType animationType() const
float duration() const
float position() const

Öffentliche Slots

void setAnimationName(const QString &name)
void setPosition(float position)

Signale

void animationNameChanged(const QString &name)
void durationChanged(float duration)
void positionChanged(float position)

Geschützte Funktionen

void setDuration(float duration)

Ausführliche Beschreibung

Qt3DAnimation::QAbstractAnimation ist eine abstrakte Basisklasse für alle Animationen. „ Qt3DAnimation::QAbstractAnimation “ kann nicht direkt instanziiert werden, sondern nur über seine Unterklassen. „QAbstractAnimation“ legt gemeinsame Eigenschaften für alle Qt3D-Animationen fest, wie beispielsweise den Namen und den Typ der Animation, die aktuelle Position und die Animationsdauer, während die eigentliche Animation den Unterklassen überlassen bleibt.

Dokumentation zu den Mitgliedstypen

enum QAbstractAnimation::AnimationType

Diese Aufzählung gibt den Typ der Animation an

KonstanteWertBeschreibung
Qt3DAnimation::QAbstractAnimation::KeyframeAnimation1Einfache Keyframe-Animationsimplementierung für QTransform
Qt3DAnimation::QAbstractAnimation::MorphingAnimation2Blend-Shape-Morphing-Animation
Qt3DAnimation::QAbstractAnimation::VertexBlendAnimation3Vertex-Blend-Animation

Eigenschaftsdokumentation

animationName : QString

Enthält den Namen der Animation.

Zugriffsfunktionen:

QString animationName() const
void setAnimationName(const QString &name)

Notifier-Signal:

void animationNameChanged(const QString &name)

[read-only] animationType : const AnimationType

Enthält den Typ der Animation.

Zugriffsfunktionen:

Qt3DAnimation::QAbstractAnimation::AnimationType animationType() const

[read-only] duration : float

Enthält die Dauer der Animation.

Zugriffsfunktionen:

float duration() const

Notifier-Signal:

void durationChanged(float duration)

position : float

Enthält die aktuelle Position der Animation.

Zugriffsfunktionen:

float position() const
void setPosition(float position)

Notifier-Signal:

void positionChanged(float position)

Dokumentation der Member-Funktionen

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

Legt den „ duration “ der Animation fest.

Siehe auch „ duration()“.

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