Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt Desktop app to browser app
Qt 6.11 is out! See what's new in the release blog

Qt Desktop app to browser app

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 5 Posters 448 Views 3 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.
  • T Offline
    T Offline
    Trdhjh
    wrote last edited by
    #1

    Hi, I have a heavy OpenGL Qt desktop app and I would love to make it run in the browser. It relies on some 3rd-party packages, e.g. QWT, boost, libssh2, etc. Is there an easy way to do this? Maybe using WebAssembly or some other approach? Or do I need to rewrite the whole app?

    Stack: Qt 6.10.2, Windows and Linux builds

    JKSHJ 1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote last edited by
      #2

      Hi and welcome to devnet,

      Qt has webassembly support however I don't know for your other dependencies. You need to check that.
      You should also verify which modules you are using as they might not be supported yet.

      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
      2
      • T Trdhjh

        Hi, I have a heavy OpenGL Qt desktop app and I would love to make it run in the browser. It relies on some 3rd-party packages, e.g. QWT, boost, libssh2, etc. Is there an easy way to do this? Maybe using WebAssembly or some other approach? Or do I need to rewrite the whole app?

        Stack: Qt 6.10.2, Windows and Linux builds

        JKSHJ Offline
        JKSHJ Offline
        JKSH
        Moderators
        wrote last edited by
        #3

        @Trdhjh said in Qt Desktop app to browser app:

        heavy OpenGL

        Be aware that browsers currently support OpenGL ES 2.0 at most (see https://stackoverflow.com/questions/36053620/which-version-of-opengl-is-supported-by-webgl )

        libssh2

        I haven't tested, but I have a feeling that you can't open a raw SSH connection from a browser app.

        Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

        1 Reply Last reply
        3
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote last edited by
          #4

          Looks like there is something in the work.

          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
          3
          • S Offline
            S Offline
            SamiV123
            wrote last edited by SamiV123
            #5

            Of course you have to rewrite the application. A desktop application (unless you have something stupidly trivial) won't ever work as-is on the web.

            The web is an insecure environment and therefore the web APIs have very much different semantics and UX compared to what you have no the desktop. For example file access.

            There are several low level differences in the APIs and their semantics. For example threading since you mention OpenGL, on the web only the JS main thread can make draw calls or use web audio.

            Bottom line is, even if your C++ code compiles with Emscripten, the semantics of pretty much every and each API is different, the UX how users expect things to work is totally different and unless you designed your application for this from the start it's not going to work.

            1 Reply Last reply
            0
            • C Offline
              C Offline
              coraldstephen11
              wrote last edited by coraldstephen11
              #6

              I wouldn't assume a rewrite yet. If most of the app is already Qt-based, WebAssembly is probably the first thing I'd evaluate. The biggest challenge is usually not Qt itself but the OpenGL requirements and whether all the third-party libraries can be built and run in the browser environment.

              A small proof-of-concept build is likely the fastest way to see how much work you're actually facing.

              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