Have any been able to remotly run a Qt application over the internet inside of, say, a web page?

  • Hi...

    I have not found anything here. Perhaps I am searching using the wrong words. So I thought I would just ask.

    Is there a way to run a Qt application over the Internet? That is, is there a way a user can interact with the Qt application over the Internet using a web browser such that the Qt application works as if it were installed locally?

    Sending our application to an end user is not something we want to do. There is a large data base and other media files involved so the package would be rather large. That plus the end user will probably not be sophisticated enough to unpackaged, install and run the Qt application.

    I know this sounds odd. You might be asking if we ever intend to send our Qt application to the end user. The answer is yes. We would like to eventually distribute a small dedicated box running Qt on an embedded processor. But prior to doing that we would like to have the end user evaluate the Qt application over the web.


  • Iv'e never been working on something related, but it comes to mind that it's possible to produce HTML-like output, thus enabling your Qt app to be seen in a web browser...

  • If the user should see a web browser, you need something that produces HTML pages and that acts like a web server...

    IIRC, there is a project on that and it was talked about on dev net, just use the search feature...

    If it should act like a local app, you MUST put something on the users PC. It might be something like a small (custom) VNC Frontend which connects to a server in the internet where your app is running and feeding the VNC connection...

  • There is a project related to "Porting QML to JS/HTML5":http://developer.qt.nokia.com/forums/viewthread/4347 and you might consider creating a browser plugin using "QtBrowserPlugin":http://doc.qt.nokia.com/solutions/4/qtbrowserplugin/ and "ActiveQt":http://doc.qt.nokia.com/latest/activeqt.html. That's most probably the closet thing you can get.

    However, you won't win anything.

    If your application requires both, the database and the media files, locally there is no difference for the end user if he has to wait until your application is downloaded or if he has to wait until your browser-based application has downloaded all the data.

    If your application allows for streaming this data - which is usually the case with databases and media files - there is no difference for the end user if he just downloads your application and streams the data on demand (QtSql supports remote databases, QtMultimediaKit supports various streaming protocols and QML streams anything anyway) or if he uses your browser-based application and streams the data on demand.

    Either way - the large data base and other media files have to get from you to the customer. It is - for the customer - all the same. For you it means creating and maintaining another bunch of code.

    EDIT Using VNC as Gerolf suggested would be another solution. But be aware that the application then runs at your end and you will have to provide enough processing power to run mutliple instances of your application (depending on how large your customer base is).

  • First off, thank you, these are great ideas and leads to consider.

    bq. Using VNC as Gerolf suggested would be another solution. But be aware that the application then runs at your end and you will have to provide enough processing power to run mutliple instances of your application.

    Let me explain our position a bit more. The purpose of the web interface is to evaluate our Qt application and the accuracy of the data base. We do not anticipate having to run more than one instance at a time from the web server (if that is what we will use here).

    Lukas, I appreciate your point regarding the need to send the end user all information regardless how they use the application. However, it is likely they will never, in an evaluation, run through every permutation. They are not that sophisticated. I doubt they will even have a written test plan (FYI, we are talking retail business - people listening to their guts - (between you (developers & engineers) and I, well, it drives me nuts!)).

    I'm am not going to be shy. I'll just come out and say I am a C/C++ programmer. So options involving other languages are currently not that appealing. So are options that are not (almost) turn-key. I know, it sounds like I not willing to do any work. In reality, being part of a small group, the true story is that management is not willing to invest time until the need is clear and the effort is justified. Right now the Qt application needs to get done first.

    So far the VNC option sounds best. I have been using VNC from (old) AT&T in one form or another for years. But tell me, how would one translate the mouse clicks at the far end (client) such that a unmodified Qt program would be able to use them? I should think, among other problems to solve, that one would have to calibrate the far end such that the mouse clicks could be normalized before they could be used (i.e. I'm thinking not all computers / browsers will give back the same X,Y numbers).

    -thanks again

  • I don't think that you will need to modify your application at all. Using VNC your application will run server-side, on a desktop you provide. The VNC on the client side just sends keystrokes and mouse movents - which get interpreted on the server-side desktop.

  • How did this turn out, st2000? What did you end up doing?

  • Ah, well, we have not put a fire under that pot, unfortunately.

    Being an engineer and always looking for the elegant solution, it pains me to say, if we do stoke that fire again, it is likely we will simply contract someone saying "Here, see this (nifty Qt based) GUI? Well, we would like you to put together a web page that acts just like it!". Ho-um.

  • And then that contracted guy would've written a parser that reads .ui files and automatically creates HTML and JS files that perfectly imitate the GUI. Now that would've been elegant :D

  • Well, maybe we didn't write our Qt application correctly...

    But since we needed to create dynamic button labels from a data base. And since our dozen or so different types of pages fit nicely in an inheritance tree paradigm. Well, we created most everything in C++ code. So no *.ui file here.

    Looking around, most Qt applications (let's use MythTV's front end as an example (mythv.org)) use fixed pages (buttons, artwork and text) (like on MythTV's top menu). Sometimes the text changes (like for TV listings in the MythTV's recordings page). But you can layout most everything ahead of time. So you probably would use Qt Creator and graphically layout everything in an XML file.

    What we did was a bit different. We described the basic page and buttons and other pages (other different button layouts) inherited from the page above adding more and more details along the way. We ended up with a nice tree of different page styles to pick from. Add to that, if we changed a fundamental aspect we usually did it up high in the inheritance. Doing it there propagates the change to all pages which inherits from that changed page. It works rather well for us.

    Sorry about the long explanation. But that's why we don't have a *.ui file in this project. However it is an interesting option if we have a project that does have a *.ui file in the future.


Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.