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. Building Qt native application for web
Forum Updated to NodeBB v4.3 + New Features

Building Qt native application for web

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 2.6k Views 1 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.
  • N Offline
    N Offline
    natural20s
    wrote on last edited by
    #1

    I have an existing 3D game developed in C++ using the Qt framework, and I am wondering if it's possible (or how to) run it inside a browser. QtWebKit appears to be more for running web browser in my game, but I'm wondering if it's possible to do something like render my game scene to a web view using QtWebKit? I found "this":http://qt-project.org/forums/viewthread/2202 thread which I think is asking a similar question, but I'm not clear as to what the solution was (aside from what sounds like remaking the application with Wt).

    Note: I am not the originally developer of the game and am new to Qt, in case my question seems ignorant : )

    1 Reply Last reply
    0
    • U Offline
      U Offline
      utcenter
      wrote on last edited by
      #2

      There is no such thing as native applications for the web, you might be able to run C++ code in some browsers on some platforms but that's about it. If you use Flash or Unity you can export a 3D game that utilizes Adobe's Stage 3D, but that will either use interpreted JS, C# or ActionScript, which is far from native.

      You want web applications you pretty much have to go for JavaScript, there are a number of engines that use WebGL and can run games in browsers, but performance is generally very poor.

      Native means compiled to platform native binary code, so you need a different binary for every different platform. Web applications go in the opposite direction, the same source code relies on the platform's own implementation of HTML/JS to make the same binary/source run across different platforms.

      Also, you might want to consider Java, which can run applets in browsers. But again, it is not native, it is the platform specific Java runtime that enables the same bytecode to execute on different platforms. Naturally, you need to have a working Java runtime, which is not available for all platforms.

      1 Reply Last reply
      0
      • N Offline
        N Offline
        natural20s
        wrote on last edited by
        #3

        Thank you for the reply, that was very useful information. I was afraid I might have to make it in Javascript, but I'll be researching my options. Thanks again!

        1 Reply Last reply
        0
        • U Offline
          U Offline
          utcenter
          wrote on last edited by
          #4

          Of course the context of "native" can vary, and I suppose it can be used in the context of "web native" which pretty much implies HTML5+JavaScript - technologies that are native to what the web is running. Native to the web not to the platform as would be native binary.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            sptrakesh
            wrote on last edited by
            #5

            http://www.webtoolkit.eu/wt for a web framework similar to Qt

            1 Reply Last reply
            0
            • U Offline
              U Offline
              utcenter
              wrote on last edited by
              #6

              This is interesting. One thing that bothers me is performance, the website says "High performance, complex web applications" but in the examples I was really surprised by the low performance of the one somewhat demanding example - the paintbrush, much lower than much heavier implementations in JS or AS. Also hardly useful for a 3D game, I didn't notice a 3D API in there.

              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