Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for WebAssembly
  4. Qt Widgets Application
Forum Updated to NodeBB v4.3 + New Features

Qt Widgets Application

Scheduled Pinned Locked Moved Solved Qt for WebAssembly
5 Posts 3 Posters 146 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    davidweisgerber
    wrote last edited by
    #1

    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?

    1 Reply Last reply
    0
    • D Offline
      D Offline
      davidweisgerber
      wrote last edited by
      #4

      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.

      SGaistS 1 Reply Last reply
      0
      • Christian EhrlicherC Offline
        Christian EhrlicherC Offline
        Christian Ehrlicher
        Lifetime Qt Champion
        wrote last edited by
        #2

        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-modules

        Sorry for the rant but I really miss self initiative and thinking nowadays.

        Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
        Visit the Qt Academy at https://academy.qt.io/catalog

        1 Reply Last reply
        3
        • D Offline
          D Offline
          davidweisgerber
          wrote last edited by
          #3

          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)

          1 Reply Last reply
          0
          • D Offline
            D Offline
            davidweisgerber
            wrote last edited by
            #4

            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.

            SGaistS 1 Reply Last reply
            0
            • D davidweisgerber has marked this topic as solved
            • D davidweisgerber has marked this topic as solved
            • D davidweisgerber

              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.

              SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote last edited by
              #5

              @davidweisgerber hi,

              Since you dived in already, I would encourage you to submit a patch to improve the documentation on that aspect.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved