So, took the Qt 6.3.0 WebAssembly for a spin in order to try some things out. This is a complete rundown of all the things that happened there.
Installed WASM support through the installer:
All good there. Did not encounter anything weird except that I did not install macOS support but eventually it appeared on my desktop:
Started Qt Creator and did not see any modals pointing out about my incomplete setup (although there was one). Created a simple QML application and did not see it runnable:
Okay, then discovered there was some notice in the banner:
Clicked that and was brought to the setup of the WASM kit. See https://bugreports.qt.io/browse/QTCREATORBUG-26894
Got the dialog where to set WASM root:
Of course I did not have emscriptem installed , so clicked on the 'installed Emscripten SDK' page did not follow them all as remembered there was something also.. so came back and opened the latter link only to discover I did have a kit (Qt 6) that was not listed. Took the last listed item:
So we know we need 1.39.8, right? Proceeded to setup of Emscripten SDK on the previous link. As important notice, installing is not sufficient, you need to activate the SDK version too. See
So came back to my project and still it does not show play icon green so quit the Qt Creator and started it again. After opening my project, Qt Creator shows it can run the app, great!
Okay, click the icon and compilation starts...but starting the app fails with:
Hmm.. so something off with QML stuff maybe? Might be due to old emscripten SDK ?
Quit Qt Creator, went back to emscripten SDK directory and installed latest version:
./emsdk install latest
and of course activate it
./emsdk activate latest
then quit Qt Creator
So, started Qt Creator and opened the project. Same result. So quess this is not emscripten version related thing. Might be something else...
As I know Qt I know there is another paradigm for UIs , called the Widgets. If I would not know this it would be game over at this point, right ?
Again, start Qt Creator and select new project. This time select Widgets app.
Guess what! It compiled nicely and after running it I get:
From the error log of the application, one can see that Qt Creator allowed me to create application name and when creating classes for that app in Qt Quick the function name carries the application name (thanks Morten Sørvig)
Once that was changed to wasm_quick everything worked well also for QML app.
For average joe, Qt with Webassembly is really painful to get started. If you know the steps and understand how e.g. environment variables work things are much easier. See separate tickets attached for this for individual error reports.