It is possible to use Qt Creator to build and run your Qt app once you have compiled Qt itself from the command line.
In Qt Creator, navigate to Tools
| Options...
| Kits
Then go to theCompilers
tab. You need to add emcc
as a C compiler, and em++
as a C++ compiler, so click on the Add
button and select Custom
from the drop-down list.
First select C
and add the following details:
Name
:emcc (1.38.16)
Compiler path
:/home/user/emsdk/emscripten/1.38.16/emcc
Make path
:/usr/bin/make
ABI
:x86 linux unknown elf 64bit
Qt mkspecs
:wasm-emscripten
Select C++
and add the following details:
Name
:emc++(1.38.16)
Compiler path
:/home/user/emsdk/emscripten/1.38.16/em++
Make path
:/usr/bin/make
ABI
:x86 linux unknown elf 64bit
Qt mkspecs
:wasm-emscripten
Click Apply
.
Go to the tab labeled Qt Versions
and click on the Add
button. Navigate to where you build Qt for WebAssembly, and, in the bin
directory, select the qmake
. Click Apply
.
Go to the tab labeled Kits
, and click on...