Qt3DLogic::QFrameAction Class
class Qt3DLogic::QFrameAction提供了一种在每一帧执行同步函数的方法。更多
头文件: | #include <QFrameAction> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS 3dlogic) target_link_libraries(mytarget PRIVATE Qt6::3dlogic) |
qmake: | QT += 3dlogic |
在 QML 中: | FrameAction |
继承: | Qt3DCore::QComponent |
状态: | 已废弃 |
公共函数
QFrameAction(Qt3DCore::QNode *parent = nullptr) |
信号
void | triggered(float dt) |
详细说明
QFrameAction 提供了一种与 Qt3D 后端同步执行每帧任务的方法。这对于实现应用程序逻辑的某些方面以及随后可折叠到附加 Qt3D 方面的原型功能非常有用。
例如,QFrameAction 可用于与 Qt3D 引擎同步的属性动画,而Qt Quick 动画元素并非完全同步,在某些情况下可能会导致卡顿。
要在每一帧执行自己的代码,请连接到QFrameAction::triggered 信号。
成员函数文档
[explicit]
QFrameAction::QFrameAction(Qt3DCore::QNode *parent = nullptr)
构建一个新的 QFrameAction 实例,其父级parent 。
[signal]
void QFrameAction::triggered(float dt)
该信号每帧发射一次,dt 为上次触发后的时间(以秒为单位)。
© 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.