Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. import QtStudio3D.OpenGL 2.6 "QML Module Not Found"
Forum Updated to NodeBB v4.3 + New Features

import QtStudio3D.OpenGL 2.6 "QML Module Not Found"

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 2 Posters 1.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mikerous
    wrote on 14 Apr 2020, 10:22 last edited by
    #1

    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.

    2f32d634-904a-488d-bd36-3b44f882ec00-image.png

    1284a227-71f1-43e9-bd99-7dcea17f2a30-image.png

    My project file settings are below.

    dd4cf9c4-90d2-439f-a29c-929f9406b9b4-image.png

    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.6

    Window {
    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

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mikerous
      wrote on 16 Apr 2020, 00:57 last edited by
      #2

      I was able to run the project as the Qt3DStudio OpenGL module was located in a different path. I had to add the following line of code to my project to define the path for the OpenGL module.

      QML_IMPORT_PATH = C:\Qt\Tools\Qt3DStudio\qml\

      1 Reply Last reply
      0
      • Y Offline
        Y Offline
        Yuropian_Polo
        wrote on 19 May 2020, 04:22 last edited by
        #3

        I try follow your ans but result is not work as below
        ↓↓↓↓↓↓
        Project ERROR: Unknown module(s) in QT: 3dstudioruntime2

        How I should to do next?

        My qml
        ↓↓↓↓↓↓
        import QtQuick 2.12
        import QtQuick.Window 2.12
        import QtStudio3D.OpenGL 2.6

        Window {
        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 += quick

        CONFIG += 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.cpp

        RESOURCES += 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

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved