Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
What do I need to do to get quick3d + wasm working?
timday last edited by timday
Sorry, probably a n00b question but I'm just not that familiar with the "Qt way" sometimes...
I have 5.15.0 installed via the "maintenance tool" on my Linux box (Debian).
The simple "hellocube" example builds and runs perfectly using
However attempting to build it using the
wasm_32just gets me a
$ ~/Qt/5.15.0/wasm_32/bin/qmake hellocube.pro Project ERROR: Unknown module(s) in QT: quick3d
Although hellocube is listed in the "webassembly examples" at https://github.com/msorvig/qt-webassembly-examples , and also amongst the wasm file size examples at the bottom https://wiki.qt.io/Qt_for_WebAssembly , so it seems promising that it's supposed to work. Are the necessary bits just not included in the MaintenanceTool's pre-built binaries currently, and the idea is you build a Qt yourself if you want to use this bit... or something else?
I have everything set up well enough to get a nice QML + charts wasm app up in my browser (indeed it is currently hosted here for the curious ; may take a while 9MB .gz ), but I'm at least as intrigued by the possibilities of quick3d in the browser.
Thanks for any pointers
This post is deleted!
You will need patience, as QtQuick3D requires OpenGL (desktop) and webassembly only supports OpenGL ES 2/3.
I heard they are working on getting it working with OpenGL ES, but for a future version.
Moia last edited by
@timday I've the same problem as your. Have you managed to solve your issue?
@Moia It won't work. As I've said earlier, Qt/Quick 3d does not support opengl ES, only the opengl desktop version, that will not work with Qt WebAssembly.
Moia last edited by
@lorn-potter actually we managed to make that example to work. hello-cube is one of the few which actually works on wasm, we tried with the teapot example but it does not render in wasm. We had to recompile qt for webassembly as suggested in qt.io blog post adding the qtquick3d modules. It was a pain though.
QtQuick3d for Qt 6 has been re-worked to include support for OpenGL ES2, so it will work for Qt WebAssembly in 6.2
How well it works is a matter to be discovered.