Qt3DCore::Quick::QQmlAspectEngine Class
class Qt3DCore::Quick::QQmlAspectEngineQQmlAspectEngine 为QAspectEngine 提供了一个环境,并为实例化 QML 组件提供了一种方法。更多
Header: | #include <Qt3DQuick/QQmlAspectEngine> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS 3DCore) target_link_libraries(mytarget PRIVATE Qt6::3DCore) |
qmake: | QT += 3dcore |
继承: | QObject |
状态: | 已废弃 |
公共类型
enum | Status { Null, Ready, Loading, Error } |
公共函数
QQmlAspectEngine(QObject *parent = nullptr) | |
Qt3DCore::QAspectEngine * | aspectEngine() const |
QQmlEngine * | qmlEngine() const |
void | setSource(const QUrl &source) |
Qt3DCore::Quick::QQmlAspectEngine::Status | status() const |
信号
void | sceneCreated(QObject *rootObject) |
void | statusChanged(Qt3DCore::Quick::QQmlAspectEngine::Status status) |
成员类型文档
enum QQmlAspectEngine::Status
发动机的状态。
常数 | 值 |
---|---|
Qt3DCore::Quick::QQmlAspectEngine::Null | 0 |
Qt3DCore::Quick::QQmlAspectEngine::Ready | 1 |
Qt3DCore::Quick::QQmlAspectEngine::Loading | 2 |
Qt3DCore::Quick::QQmlAspectEngine::Error | 3 |
成员函数文档
[explicit]
QQmlAspectEngine::QQmlAspectEngine(QObject *parent = nullptr)
用parent 构建一个新的 QQmlAspectEngine。
Qt3DCore::QAspectEngine *QQmlAspectEngine::aspectEngine() const
返回 aspectEngine。
QQmlEngine *QQmlAspectEngine::qmlEngine() const
返回发动机。
[signal]
void QQmlAspectEngine::sceneCreated(QObject *rootObject)
当场景被实例化后,rootObject 。这样就可以在将场景传递给方面引擎之前对其进行操作。方便窗口类在框架图上设置摄像机和曲面,以及为输入方面等设置事件源。
void QQmlAspectEngine::setSource(const QUrl &source)
将source 设置为要创建的 QML 组件的源。
Qt3DCore::Quick::QQmlAspectEngine::Status QQmlAspectEngine::status() const
返回状态。
[signal]
void QQmlAspectEngine::statusChanged(Qt3DCore::Quick::QQmlAspectEngine::Status status)
当发动机状态发生变化时,该信号会通过status 发送。
© 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.