本页内容

Qt3DAnimation::QAnimationCallback Class

class Qt3DAnimation::QAnimationCallback

表示一个动画回调对象。更多内容...

头文件: #include <qanimationcallback.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3danimation)
target_link_libraries(mytarget PRIVATE Qt6::3danimation)
qmake: QT += 3danimation
状态: 技术预览

该类处于技术预览阶段,内容可能会有变动。

公共类型

enum Flag { OnOwningThread, OnThreadPool }
flags Flags

公共函数

virtual void valueChanged(const QVariant &value) = 0

详细说明

成员类型文档

enum QAnimationCallback::Flag
flags QAnimationCallback::Flags

用于指示如何调用valueChanged()函数的标志。

常量值描述
Qt3DAnimation::QAnimationCallback::OnOwningThread0x0回调函数在拥有该线程(GUI 或主线程)上被调用。
Qt3DAnimation::QAnimationCallback::OnThreadPool0x01回调函数在线程池的工作线程上调用。

Flags 类型是QFlags<Flag> 的 typedef。它存储 Flag 值的按“或”运算组合。

成员函数文档

[pure virtual] void QAnimationCallback::valueChanged(const QVariant &value)

当动画对象value 发生变化时触发的回调函数。

另请参阅 QCallbackMapping::setCallback()。

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