Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
5.15.0 Beta3
-
None
-
Built using Emscripten 1.39.10 running on Docker (using https://github.com/forderud/QtWasm/blob/master/image/Dockerfile ).
Tested in Firefox 75 (64bit) and Chrome 80 (64bit) on Windows 10.
Description
I'm struggling to enable threading for my QMake projects when targeting WASM. I've already tried adding CONFIG += thread in the pro file, but it doesn't seem to trigger enabling of USE_PTHREADS=1 as defined in https://github.com/qt/qtbase/blob/5.15/mkspecs/features/wasm/wasm.prf
ANSWER:
The Qt SDK needs to be built with threading support enabled in order to use threading in Qt-based projects. This can be achieved by adding the -feature-thread argument to configure when building Qt.