Qt3DCore::QAspectJob Class

class Qt3DCore::QAspectJob

在一个方面中执行的工作的基类。更多

头文件: #include <Qt3DCore/QAspectJob>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3DCore)
target_link_libraries(mytarget PRIVATE Qt6::3DCore)
qmake: QT += 3dcore
状态:已废弃

公共函数

void addDependency(QWeakPointer<Qt3DCore::QAspectJob> dependency)
const std::vector<QWeakPointer<Qt3DCore::QAspectJob>> &dependencies() const
virtual bool isRequired()
virtual void postFrame(Qt3DCore::QAspectEngine *aspectEngine)
void removeDependency(QWeakPointer<Qt3DCore::QAspectJob> dependency)
virtual void run() = 0

详细说明

成员函数文档

void QAspectJob::addDependency(QWeakPointer<Qt3DCore::QAspectJob> dependency)

dependency 添加到方面作业中。

const std::vector<QWeakPointer<Qt3DCore::QAspectJob>> &QAspectJob::dependencies() const

返回方面任务的依赖关系。

[virtual] bool QAspectJob::isRequired()

如果作业确实有事情要做,则应返回 true(默认值)。如果返回 false,作业将不会被调度(但它的依赖项会被调度)。

[virtual] void QAspectJob::postFrame(Qt3DCore::QAspectEngine *aspectEngine)

当所有工作完成后,在主线程中调用。aspectEngine 是负责运行循环的引擎。

void QAspectJob::removeDependency(QWeakPointer<Qt3DCore::QAspectJob> dependency)

从方面任务中删除给定的dependency

[pure virtual] void QAspectJob::run()

执行任务。调度程序会在一个单独的线程上调用。

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