EntityLoader QML Type
提供了一种动态加载实体子树的方法。更多内容...
| Import Statement: | import Qt3D.Core 2.12 |
| Inherits: | |
| Status: | Deprecated |
此类型已弃用。我们强烈建议不要在新代码中使用它。
属性
详细说明
EntityLoader 提供了一种从 QML 源文件加载预定义实体集的功能。EntityLoader 本身即为一个实体,且加载后的实体树会被设置为加载器的子节点。可通过EntityLoader::entity 属性访问加载后的实体树根节点。
EntityLoader {
id: loader
source: "./SphereEntity.qml"
}属性文档
entity : QtQml::QtObject [read-only]
保存已加载的实体树根节点。
该属性允许访问加载器的内容。如果 status 属性等于EntityLoader.Ready,则该属性引用一个有效的 Entity 对象;否则,该属性为 null。
source : url
存储源网址。
status : Status
保存实体加载器的状态。
- EntityLoader.Null
- EntityLoader.Loading
- EntityLoader.Ready
- EntityLoader.Error
© 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.