So ya, I have been doing work for the up and coming Finnish company Intopalo getting Qt5 for WebAssembly using emscripten up and running. This is the 3rd Finnish company I have done work for, and the 4th Nordic company (Trolltech, Nokia, Jolla, Intopalo)
This is very much a work in progress.
There was a Qt4 version, emscripten-qt and a related Qt5 for Native Client which do similar things, and we have taken inspiration from both these projects. Thanks!
The gist of it:
My working Qt5 repo is here, (the wm branch contains multi window and window decorations) while there is also an outdated WIP gerrit MR which will get updated at some point.
This is how I configure Qt for emscripten:
. ~/emsdk/emsdk_env.sh (to get em compiler in path)
~/depot/qt/qt5/qtbase/configure -xplatform emscripten
-confirm-license -opensource -nomake tests -nomake examples
-developer-build -no-dbus -no-thread
and then, use that qmake to compile a Qt app!
To run the app, in the firefox browser
emrun --browser firefox path/to/app.html
This is all bleeding edge from the emscripten compiler to the web assembly support in the browser, so your mileage may vary.
Compiling into wasm brings much smaller download sizes, but you need to have a browser that supports it.
There is still heaps of work to do to bring it up to release state. So for now, it is still a research and WIP project, and a lot of things may or may not work. But it can run some Qt widget based apps in your (firefox) browser!
Currently there is no support for qml/qt quick. That just means we haven't tried it as our focus is currently on widgets and opengl.
Personally, I would like to see location and some sensor events, but that is for the future.