zebreus / qt-webassembly-docker

A container for building Qt applications for the web platform using Qt for WebAssembly.
MIT License
16 stars 8 forks source link

Add qt6 #3

Open patrickelectric opened 3 years ago

patrickelectric commented 3 years ago

Signed-off-by: Patrick José Pereira patrickelectric@gmail.com

zebreus commented 3 years ago

I looked into adding qt6 a few weeks ago, but it does currently not build for webassembly.

The PR accidently builds qt5.15, as the wrong resource is specified in qt-pipeline.yml (line 289).

Adding qt6 will probably be a bit more difficult, as qt switched its build system from qmake to cmake. I currently have a Dockerfile, that should be able to built qt6, but it currently fails. This is probably a qt problem, as qt6.0 does not support webassembly afaik.

patrickelectric commented 3 years ago

It appears that an initial support already exists: http://qtandeverything.blogspot.com/2021/04/qt-6-webassembly-qtquick3d-or-not-april.html

zebreus commented 3 years ago

I tried that yesterday, but I cannot get it to work correctly. I added the Dockerfile to the repository, so you can try it yourself. It seems to build a correct version of Qt6 for WASM, but linking always fails for me. And for some reason, it only works if you use qmake -d. I have not tried using cmake yet.