Qt3D 的变更
Qt 6 是为了使该框架更高效、更易于使用而进行的有意识努力的成果。
我们力求在每个版本中保持所有公共 API 的二进制和源代码兼容性。但为了使 Qt 成为更好的框架,某些变更在所难免。
在本主题中,我们将总结 Qt3D 中的这些变更,并提供相应的处理指南。
新的渲染后端
在 5.14 和 5.15 版本期间,渲染后端已逐步迁移至插件中。
Qt 6 的发布完成了这项工作,并引入了一个基于 RHI 的新渲染后端,该后端将支持在相关平台上使用 Vulkan、Metal 或 DirectX。
RHI 后端为默认选项,但可通过设置环境变量进行控制,具体说明请参阅here 。
代码变更
部分类的所属模块已发生变更。特别是QBuffer 、QAttribute 和 QGeometry 类(及其相关辅助类)已从 Render 模块移至 Core 模块。
新 API
- Qt3DCore::QGeometryView 提供网格的所有详细信息
- Qt3DCore::QBoundingVolume 提供了一种查询或覆盖几何体轴对齐边界框大小的方法
- Qt3DRender::QPickingProxy 提供了一种为拾取操作指定替代(通常更简单)几何体的方法
- Qt3DCore::QAbstractAspect Qt3DCore::QAspectJob 增加了若干方法,用于促进和优化后端操作的同步。
© 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.