Qt Widgets Application
-
Hi,
some 5 years ago we implemented and published a Qt Widgets application in WebAssembly using Qt 5. Though we abandoned this application, today I am trying to port our main product to web assembly. One part is a Qt QML application, the other one is a Qt Widgets application. Neither of them is running of them but I am making good progress.However, chat gpt says that Qt Widgets won't be supported with Qt Web Assembly. Is that true?
-
I was able to solve it - had to fine tune a lot of the compilation and linker parameters and use the Qt HTML and JS libraries. It would be cool if the documentation could be filled with information how to use Qt WebAssembly with CMake without Qt Creator and also give more information on porting.
-
It's scary that people are rather asking some obscure tools which answer wrong than simply reading the docs which can be easily found by every search engine. And even when the answer is spurious a rather long post is written instead looking by themselves.
https://doc.qt.io/qt-6/wasm.html#supported-qt-modulesSorry for the rant but I really miss self initiative and thinking nowadays.
-
OK I just thought it was deprecated because starting my Qt Widgets-based application gives me the following errors:
FATAL [0] - Cannot create window: no screens available
Uncaught RuntimeError: Aborted(native code called abort())
at abort (custoservicecenter.js:844:41)
at __abort_js (custoservicecenter.js:6355:3)
at custoservicecenter.wasm.abort (custoservicecenter.wasm:0x3f81359)
at custoservicecenter.wasm.qAbort() (http://localhost:6931/custoservicecenter.wasm)
at invoke_v (custoservicecenter.js:15156:29)
at custoservicecenter.wasm.qt_message(QtMsgType, QMessageLogContext const&, char const*, void*) (http://localhost:6931/custoservicecenter.wasm)
at invoke_viiii (custoservicecenter.js:15011:29)
at custoservicecenter.wasm.QMessageLogger::fatal(char const*, ...) const (http://localhost:6931/custoservicecenter.wasm)
at custoservicecenter.wasm.QWindowPrivate::init(QWindow*, QScreen*) (http://localhost:6931/custoservicecenter.wasm)
at custoservicecenter.wasm.QWindow::QWindow(QWindowPrivate&, QWindow*) (http://localhost:6931/custoservicecenter.wasm) -
I was able to solve it - had to fine tune a lot of the compilation and linker parameters and use the Qt HTML and JS libraries. It would be cool if the documentation could be filled with information how to use Qt WebAssembly with CMake without Qt Creator and also give more information on porting.
-
-
-
I was able to solve it - had to fine tune a lot of the compilation and linker parameters and use the Qt HTML and JS libraries. It would be cool if the documentation could be filled with information how to use Qt WebAssembly with CMake without Qt Creator and also give more information on porting.
@davidweisgerber hi,
Since you dived in already, I would encourage you to submit a patch to improve the documentation on that aspect.