Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. QtDataVisualization Surface3D QML item crashes app when using Qt6
Forum Updated to NodeBB v4.3 + New Features

QtDataVisualization Surface3D QML item crashes app when using Qt6

Scheduled Pinned Locked Moved Solved Qt 6
4 Posts 2 Posters 455 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    The following QML script works when using Qt 5.15.9 but crashes when using 6.2.4 and 6.3.0.

    import QtQuick 2.15
    import QtQuick.Window 2.15
    import QtDataVisualization 1.15
    
    Window {
        width: 640
        height: 480
        visible: true
        title: qsTr("Hello World")
    
        Surface3D {}
    }
    
    

    The Qt Quick 2 Spectrogram Example (which uses the Surface3D item) works with 6.3.0.

    I'm using Windows 10 and installed Qt with MinGW 11.2.0 64-bit (for Qt6) and MinGW 8.1.0 64-bit (for Qt5).
    Is there any reason this shouldn't be working with Qt6? Any guidance is much appreciated!

    1 Reply Last reply
    0
    • M Offline
      M Offline
      MahmutVeli
      wrote on last edited by
      #2

      I face the same problem, when using Surface3D in Qt 6.3 the app crashes on startup. For Qt 5 it works fine

      1 Reply Last reply
      0
      • M Offline
        M Offline
        MahmutVeli
        wrote on last edited by
        #3

        I find the solution, from the documentation:
        it is necessary to define the rendering backend explicitly either on your environment variables, or in your application main. It can be defined by adding qputenv("QSG_RHI_BACKEND", "opengl"); in the beginning of your main function.

        https://forum.qt.io/topic/136770/qtdatavisualization-surface3d-qml-item-crashes-app-when-using-qt6/2

        1 Reply Last reply
        0
        • ? Offline
          ? Offline
          A Former User
          wrote on last edited by
          #4

          Great, thank you! Here's the link to the documentation for anyone who is curious.

          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