Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for WebAssembly
  4. QOpenGLWidget is not supported on this platform.

QOpenGLWidget is not supported on this platform.

Scheduled Pinned Locked Moved Unsolved Qt for WebAssembly
5 Posts 3 Posters 1.6k Views 1 Watching
  • 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.
  • S Offline
    S Offline
    shome
    wrote on last edited by
    #1

    qt version: 5.15.2, emscripten: 1.39.8, ubuntu 18.04

    I compiled successfully various qt for web assembly examples that use QOpenGLWidget. When I open the html files on my firefox or chrome, I get error
    QOpenGLWidget is not supported on this platform.

    for example when I compiled html on my browser(chrome or firefox) for the example at https://github.com/msorvig/qt-webassembly-examples/tree/master/widgets_openglwidget I get a black screen with error:

    QOpenGLWidget is not supported on this platform.

    Ronel_qtmasterR 1 Reply Last reply
    0
    • S shome

      qt version: 5.15.2, emscripten: 1.39.8, ubuntu 18.04

      I compiled successfully various qt for web assembly examples that use QOpenGLWidget. When I open the html files on my firefox or chrome, I get error
      QOpenGLWidget is not supported on this platform.

      for example when I compiled html on my browser(chrome or firefox) for the example at https://github.com/msorvig/qt-webassembly-examples/tree/master/widgets_openglwidget I get a black screen with error:

      QOpenGLWidget is not supported on this platform.

      Ronel_qtmasterR Offline
      Ronel_qtmasterR Offline
      Ronel_qtmaster
      wrote on last edited by
      #2

      @shome opengl is not supported using qt for webassembly.check the supported modules here https://doc.qt.io/qt-5/wasm.html

      SGaistS 1 Reply Last reply
      0
      • Ronel_qtmasterR Ronel_qtmaster

        @shome opengl is not supported using qt for webassembly.check the supported modules here https://doc.qt.io/qt-5/wasm.html

        SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by SGaist
        #3

        @Ronel_qtmaster except that the OpenGL module is part of qtbase and without it, QtQuick would not be available.

        That said, @shome, do you really need QOpenGLWidget ? Did you test with QOpenGLWindow ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        S 1 Reply Last reply
        0
        • SGaistS SGaist

          @Ronel_qtmaster except that the OpenGL module is part of qtbase and without it, QtQuick would not be available.

          That said, @shome, do you really need QOpenGLWidget ? Did you test with QOpenGLWindow ?

          S Offline
          S Offline
          shome
          wrote on last edited by
          #4

          @SGaist I am trying to compile a code for wasm that uses qt 5.12.8 and inherits from the qopenglwidget class. The code compiled fine for linux 18.04. The code uses QtWidgets, QtCore and QtGui.

          @Ronel_qtmaster : I found some samples at qt-wasm-github that use qopenglwidget. Is qopenglwidget not supported for qt 6 too?
          I read that qopenglwidget may have some issues for wasm which was solved in qt 6.4.

          Screenshot from 2024-03-07 12-58-00.png

          I think I have two choices. Kindly suggest which would be better.

          • To try to compile the code on qt 6.4 or 6.5(LTS)- I would like to know if the codes using qopenglwidget and other qt-base modules (QtWidgets, QtCore and QtGui.) would compile (for wasm) on qt6.5

          • To use QOpenGLWindow instead of qopenglwidget. I want to know if QOpenGLWindow compile fine with qt 5.15.2? My code inherits from qopenglwidget, so I dont know how easy would it be moving to qopenglwindow

          SGaistS 1 Reply Last reply
          0
          • S shome

            @SGaist I am trying to compile a code for wasm that uses qt 5.12.8 and inherits from the qopenglwidget class. The code compiled fine for linux 18.04. The code uses QtWidgets, QtCore and QtGui.

            @Ronel_qtmaster : I found some samples at qt-wasm-github that use qopenglwidget. Is qopenglwidget not supported for qt 6 too?
            I read that qopenglwidget may have some issues for wasm which was solved in qt 6.4.

            Screenshot from 2024-03-07 12-58-00.png

            I think I have two choices. Kindly suggest which would be better.

            • To try to compile the code on qt 6.4 or 6.5(LTS)- I would like to know if the codes using qopenglwidget and other qt-base modules (QtWidgets, QtCore and QtGui.) would compile (for wasm) on qt6.5

            • To use QOpenGLWindow instead of qopenglwidget. I want to know if QOpenGLWindow compile fine with qt 5.15.2? My code inherits from qopenglwidget, so I dont know how easy would it be moving to qopenglwindow

            SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @shome since you are targeting wasm, I would recommend to port your code to 6.5 at least. There's not much sense in trying to build it using an outdated version of Qt for such a new platform.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            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