QOpenGLWidget is not supported on this platform.
-
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.
-
@shome opengl is not supported using qt for webassembly.check the supported modules here https://doc.qt.io/qt-5/wasm.html
-
@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 ?
-
@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.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
-