本页内容

FrameAction QML Type

提供了一种在每个帧中执行同步函数的方法。更多内容...

Import Statement: import Qt3D.Logic 2.12
In C++: QFrameAction
Inherits:

Component3D

Status: Deprecated

此类型已弃用。我们强烈建议不要在新代码中使用它。

信号

详细说明

FrameAction 提供了一种与 Qt3D 后端同步的方式,用于在每个帧中执行任务。这对于实现应用程序逻辑的某些方面,以及原型设计日后可整合到 Qt3D 其他功能中的功能非常有用。

例如,当Qt Quick 动画元素无法实现完美同步,并在某些情况下可能导致卡顿时,可使用FrameAction使属性动画与Qt3D引擎保持同步。

若要在每个帧执行自定义代码,请连接到FrameAction::triggered 信号。

信号文档

triggered(real dt)

该信号在每个帧中发出,其中dt 表示自上次触发以来经过的时间(单位为秒)。

注意: 对应的处理程序 为onTriggered 。

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