Important: Please read the Qt Code of Conduct -

What do I need to do to get quick3d + wasm working?

  • 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 gcc_64 tools.

    However attempting to build it using the wasm_32 just gets me a

    $ ~/Qt/5.15.0/wasm_32/bin/qmake 
    Project ERROR: Unknown module(s) in QT: quick3d

    Although hellocube is listed in the "webassembly examples" at , and also amongst the wasm file size examples at the bottom , 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.

  • @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.

  • @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 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.

Log in to reply