Qt3DAnimation::QAnimationGroup Class
class Qt3DAnimation::QAnimationGroup将动画分组的类。更多
头文件: | #include <QAnimationGroup> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS 3danimation) target_link_libraries(mytarget PRIVATE Qt6::3danimation) |
qmake: | QT += 3danimation |
继承: | QObject |
状态: | 已废弃 |
属性
公共功能
QAnimationGroup(QObject *parent = nullptr) | |
void | addAnimation(Qt3DAnimation::QAbstractAnimation *animation) |
QList<Qt3DAnimation::QAbstractAnimation *> | animationList() |
float | duration() const |
QString | name() const |
float | position() const |
void | removeAnimation(Qt3DAnimation::QAbstractAnimation *animation) |
void | setAnimations(const QList<Qt3DAnimation::QAbstractAnimation *> &animations) |
公共插槽
void | setName(const QString &name) |
void | setPosition(float position) |
信号
void | durationChanged(float duration) |
void | nameChanged(const QString &name) |
void | positionChanged(float position) |
详细说明
Qt3DAnimation::QAnimationGroup 类用于对多个动画进行分组,使它们可以作为一个动画运行。为该组设置的位置也会设置给组中的所有动画。持续时间是单个动画的最大值。这些动画可以是任何受支持的动画类型,且名称不必相同。
属性文档
[read-only]
duration : const float
保存组中动画的最长持续时间。
访问功能:
float | duration() const |
通知信号:
void | durationChanged(float duration) |
name : QString
保存动画组的名称。
访问功能:
QString | name() const |
void | setName(const QString &name) |
通知信号:
void | nameChanged(const QString &name) |
position : float
保持动画位置。
访问功能
float | position() const |
void | setPosition(float position) |
通知信号:
void | positionChanged(float position) |
成员函数 文档
[explicit]
QAnimationGroup::QAnimationGroup(QObject *parent = nullptr)
构建一个 QAnimationGroup,parent 。
void QAnimationGroup::addAnimation(Qt3DAnimation::QAbstractAnimation *animation)
为组添加新的animation 。
QList<Qt3DAnimation::QAbstractAnimation *> QAnimationGroup::animationList()
返回组中的动画列表。
void QAnimationGroup::removeAnimation(Qt3DAnimation::QAbstractAnimation *animation)
从组中删除animation 。
void QAnimationGroup::setAnimations(const QList<Qt3DAnimation::QAbstractAnimation *> &animations)
将animations 设置为组。旧的动画将被删除。
© 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.