Qt3D Extras and Qt3D Core support in Qt 6.7.2 ?
-
Hello all,
I am writing a 3D application for drawing the curve using Qt3D extras and Qt3D Core library using Qt 6.7.2 in QML. For this I have added the following in my CmakeLists.txt -
find_package(Qt6 6.5 REQUIRED COMPONENTS Quick)
find_package(Qt6 REQUIRED COMPONENTS 3dextras)
target_link_libraries(appTest3D PRIVATE Qt6::3dextras)
qt_standard_project_setup(REQUIRES 6.5)I am getting the following error also-
QQmlApplicationEngine failed to load component
qrc:/qt/qml/Test3D/Main.qml:114:9: Qt3DExtras.Camera - Qt3DExtras is neither a type nor a namespacePlease help me out - whether and which thing I have missed ?
-
Hello all,
I am writing a 3D application for drawing the curve using Qt3D extras and Qt3D Core library using Qt 6.7.2 in QML. For this I have added the following in my CmakeLists.txt -
find_package(Qt6 6.5 REQUIRED COMPONENTS Quick)
find_package(Qt6 REQUIRED COMPONENTS 3dextras)
target_link_libraries(appTest3D PRIVATE Qt6::3dextras)
qt_standard_project_setup(REQUIRES 6.5)I am getting the following error also-
QQmlApplicationEngine failed to load component
qrc:/qt/qml/Test3D/Main.qml:114:9: Qt3DExtras.Camera - Qt3DExtras is neither a type nor a namespacePlease help me out - whether and which thing I have missed ?
-
@IamSumit
Upgrade Qt to the latest and you will be able to find enough examples under
Examples/Qt-6.9.0/quick3d and Examples/Qt-6.9.0/quick3dphysics -
Hello all,
I am writing a 3D application for drawing the curve using Qt3D extras and Qt3D Core library using Qt 6.7.2 in QML. For this I have added the following in my CmakeLists.txt -
find_package(Qt6 6.5 REQUIRED COMPONENTS Quick)
find_package(Qt6 REQUIRED COMPONENTS 3dextras)
target_link_libraries(appTest3D PRIVATE Qt6::3dextras)
qt_standard_project_setup(REQUIRES 6.5)I am getting the following error also-
QQmlApplicationEngine failed to load component
qrc:/qt/qml/Test3D/Main.qml:114:9: Qt3DExtras.Camera - Qt3DExtras is neither a type nor a namespacePlease help me out - whether and which thing I have missed ?
@IamSumit said in Qt3D Extras and Qt3D Core support in Qt 6.7.2 ?:
QQmlApplicationEngine failed to load component
qrc:/qt/qml/Test3D/Main.qml:114:9: Qt3DExtras.Camera - Qt3DExtras is neither a type nor a namespace- According to the docs, the
Camera
type is inQt3D.Render
, notQt3D.Extras
: https://doc.qt.io/qt-6/qml-qt3d-render-camera.html - In QML, you don't prefix the type with the module/namespace. So write
Camera
instead ofQt3DRender.Camera
(exception: If you apply a Qualifier to the import statement, then you would prefix the type with the Qualifier; see https://doc.qt.io/qt-6/qtqml-syntax-imports.html )
- According to the docs, the