import QtStudio3D.OpenGL 2.6 "QML Module Not Found"
-
I'm trying to run a Qt Quick project with a 3D Studio project that was created. When I try a quick example in Qt Creator it is not able to import the OpenGL module. The version of QT Create I am running is below. Along with this the version of Qt 3DStudio is below.
My project file settings are below.
And here is the simple QML code I am trying to implement.
import QtQuick 2.12
import QtQuick.Window 2.12
import QtStudio3D.OpenGL 2.6Window {
visible: true
width: 640
height: 480
title: qsTr("Hello World")Studio3D { id: studio3D width: parent.width height: parent.height anchors.fill: parent ViewerSettings { showRenderStats: true scaleMode: ViewerSettings.ScaleModeFit } Presentation { id: truck source: "qrc:/SampleTruck/SampleTruck.uia"
// Element {
// id: textLabel
// elementPath: ""
// }
}}
}
Is there a simple solution or something I am missing for using the Qt3Studio.OpenGL Module?
Thank you,
Mike
-
I try follow your ans but result is not work as below
↓↓↓↓↓↓
Project ERROR: Unknown module(s) in QT: 3dstudioruntime2How I should to do next?
My qml
↓↓↓↓↓↓
import QtQuick 2.12
import QtQuick.Window 2.12
import QtStudio3D.OpenGL 2.6Window {
visible: true
width: 640
height: 480
title: qsTr("Hello World")Studio3D { id: studio3D width: parent.width height: parent.height anchors.fill: parent }
}
My project
↓↓↓↓↓↓
QT += quickCONFIG += c++11
The following define makes your compiler emit warnings if you use
any Qt feature that has been marked deprecated (the exact warnings
depend on your compiler). Refer to the documentation for the
deprecated API to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
You can also make your code fail to compile if it uses deprecated APIs.
In order to do so, uncomment the following line.
You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
SOURCES +=
main.cppRESOURCES += qml.qrc
Additional import path used to resolve QML modules in Qt Creator's code model
QML_IMPORT_PATH = D:\Qt\Tools\Qt3DStudio\qml
Additional import path used to resolve QML modules just for Qt Quick Designer
QML_DESIGNER_IMPORT_PATH =
Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target