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.
Forum Updated to NodeBB v4.3 + New Features

QOpenGLWidget is not supported on this platform.

Scheduled Pinned Locked Moved Unsolved Qt for WebAssembly
5 Posts 3 Posters 1.1k 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 7 Mar 2024, 14:23 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.

    R 1 Reply Last reply 7 Mar 2024, 14:51
    0
    • S shome
      7 Mar 2024, 14:23

      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.

      R Offline
      R Offline
      Ronel_qtmaster
      wrote on 7 Mar 2024, 14:51 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

      S 1 Reply Last reply 7 Mar 2024, 20:51
      0
      • R Ronel_qtmaster
        7 Mar 2024, 14:51

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

        S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 7 Mar 2024, 20:51 last edited by SGaist 3 Jul 2024, 20:51
        #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 8 Mar 2024, 04:24
        0
        • S SGaist
          7 Mar 2024, 20:51

          @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 8 Mar 2024, 04:24 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

          S 1 Reply Last reply 8 Mar 2024, 07:06
          0
          • S shome
            8 Mar 2024, 04:24

            @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

            S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 8 Mar 2024, 07:06 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

            3/5

            7 Mar 2024, 20:51

            • Login

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