Qt Quick 3D 提供用於創建 3D 內容和 3D 用戶界麵的高級 API,基於 Qt Quick . Rather than using an external engine, which creates syncing issues and additional layers of abstraction, Qt Quick 3D provides extensions to the existing Qt Quick 場景圖形 for spatial content and a renderer for that extended scene graph. When using the spatial scene graph, it's possible to mix Qt Quick 2D content with 3D content.
Qt Quick 3D also provides for XR and VR applications with Qt Quick 3D Xr .
模塊的 QML 類型是可用的透過
QtQuick3D
導入。要使用類型,添加以下 import 語句到 .qml 文件:
import QtQuick3D
The following module imports provide additional functionality:
import QtQuick3D.AssetUtils import QtQuick3D.Helpers import QtQuick3D.Particles3D import QtQuick3D.Xr
使用 Qt 模塊的 C++ API 要求直接 (或透過其它依賴) 鏈接到模塊庫。幾個構建工具對此有專用支持,包括 CMake and qmake .
使用
find_package()
命令定位所需模塊組件在
Qt6
包:
find_package(Qt6 REQUIRED COMPONENTS Quick3D)
target_link_libraries(mytarget PRIVATE Qt6::Quick3D)
更多細節,見 構建采用 CMake 概述。
要配置采用 qmake 構建模塊,添加模塊作為值為
QT
變量在工程的 .pro 文件:
QT += quick3d
當從源構建時,確保模塊和工具來自 qtdeclarative and qtshadertools repositories are built first, as it's not possible to use Qt Quick 3D without these. Having qtquicktimeline 可用強烈建議為好,因為基於關鍵幀的動畫否則將不可用。
此外,某些範例依賴 Qt Quick Controls .
Qt Quick 3D 的變化 列齣瞭 Qt 的 Qt 6 係列在模塊 API 和功能上所做齣的重要改變。
Qt Quick 3D 在商業許可下是可用的來自 Qt 公司 。此外,它是可用的根據 GNU GPL (一般公共許可) 第 3 版 。見 Qt 許可 進一步瞭解細節。
Furthermore, Qt Quick 3D potentially contains third party modules under the following permissive licenses:
| MIT 許可 | |
| MIT 許可 | |
| Apache 許可 2.0 | |
| MIT 許可 | |
| MIT 許可 | |
| BSD 3 條款新 (或修訂) 許可 | |
| Apache 許可 2.0 | |
| BSD 3 條款新 (或修訂) 許可 | |
| MIT 許可 | |
| MIT 許可 |