Results 1 to 11 of 11

Thread: What's the best way to put a Qt GUI on a webpage?

  1. #1
    Join Date
    Aug 2009
    Posts
    140
    Thanks
    22
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default What's the best way to put a Qt GUI on a webpage?

    I may be overlooking the obvious answer to this, but when I look at QtWebKit, and (by extension, Qt Quick's integration with QtWebKit) it seems to be about embedding a webpage into a Qt desktop application. I want to go in the other direction. I want to take my Qt desktop application and embed it into a website. It seems that there's no direct way to embed a traditional QWidget-based desktop GUI in a webpage, that's fine. Rather I'll have to use components from a different class/module, but which ones? I can use QtSVG for rendering QPaintDevices, which can then be put into HTML5 <canvas> elements, correct? That seems like a relatively straightforward transition, but how do I do it for widgets (push buttons, checkboxes, etc.)?

  2. #2
    Join Date
    Feb 2011
    Location
    Bangalore
    Posts
    207
    Thanks
    20
    Thanked 28 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: What's the best way to put a Qt GUI on a webpage?

    Do you know of NaCl of google chrome fame? http://labs.qt.nokia.com/2010/06/25/...lient-preview/
    Even this works only partially. And only for chrome. You seem to aim/want a generic solution. That I can add, on any day, to my Christmas wish list. Java was accused of lack of interest in web technologies back in '95. They went ahead and allayed those fears. Qt never ventured there. Alas.

  3. The following user says thank you to pkj for this useful post:

    MattPhillips (11th January 2012)

  4. #3
    Join Date
    Aug 2009
    Posts
    140
    Thanks
    22
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: What's the best way to put a Qt GUI on a webpage?

    Ok thanks I'll look into that but is this really the only (semi-)option? Qt Quick is supposed to be JavaScript/CSS-like, it seems like was designed for this, so there's no way to auto-generate, from a Qt Quick QML file, something that the html5 parser can read?

  5. #4
    Join Date
    Feb 2011
    Location
    Bangalore
    Posts
    207
    Thanks
    20
    Thanked 28 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: What's the best way to put a Qt GUI on a webpage?

    AFAIK, Qt is a windowing system. And more. But that's just about it. What you are asking for is a web application framework, which is entirely different ball game. There is a library called Wt (Witty) which tries to do dynamic websites using something similar to model view framework of qt. There is qxt library which extends web services using qt.
    JavaScript/CSS is something which any big application can have. Thanks to QtScript. Having the ability to script, cannot mean the application is web ready...
    But how I wish Qt had web application framework too

  6. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: What's the best way to put a Qt GUI on a webpage?

    You could do web programming with Qt but it requires you to implement, support and ask your users to download and install a web browser plugin, just as we have a browser plugin for Java. What's more difficult is that contrary to Java that runs a virtual machine (so the "executable" is pretty much platform agnostic), Qt apps are compiled for a specific platform (of course this doesn't apply to pure QML apps).
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. #6
    Join Date
    Jun 2012
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: What's the best way to put a Qt GUI on a webpage?

    Hi all, I am new in the forum.
    I reopen this discussion to ask if someone has succeeded in using Qt and NaCl.
    I've trying to do it for some days following the few guides on web (e.g., http://qt-project.org/wiki/Qt_for_Google_Native_Client), but with no success, I have too many configuration issues.
    I've heard that with Qt5 would be easier to use NaCl (http://devworks.thinkdigit.com/Featu...l-as_8287.html), can you confirm this?
    Or is there an alternative, for example Wt? My application is based on the Qt example "Elastic Nodes": I have a graph and some dialog boxes.
    Thank you.

  8. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: What's the best way to put a Qt GUI on a webpage?

    It really depends on what you want to do.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  9. #8
    Join Date
    Jun 2012
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: What's the best way to put a Qt GUI on a webpage?

    It would be a bit long to explain: my application is the graphical interface of an algorithm over a network. The user can set the parameters via dialog boxes, run the algorithm, and see "the nodes of the network changing color". I use QWidget, QGraphicsItem, QGraphicsScene, QLabel, QString, QPushButton....

    Anyway, I'm going to try Wt and then tell you if it was ok or not.

    What about Qt5? Can you tell me if NaCl will be "integrated" in it as I have heard?
    Thank you!

    EDIT: Reading Wt documentation I immediately got that there is no equivalent WGraphics* for QGraphics* ... this seems to make impossible to rewrite my code in Wt.
    I wonder if I could I use only widgets... I'll try.
    Last edited by sp27; 25th June 2012 at 09:32.

  10. #9
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: What's the best way to put a Qt GUI on a webpage?

    Wt has nothing to do with Qt apart the API. As output you will get a regular HTML webpage.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  11. #10
    Join Date
    Jun 2012
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: What's the best way to put a Qt GUI on a webpage?

    I understand, and I realize I cannot easily convert my code from Qt to Wt for what concerns QGraphics*.
    I will study Wt better. My first goal is the reproduce something like the "Elastic Nodes" Qt example in Wt.
    Any hint will be appreciated!

  12. #11
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: What's the best way to put a Qt GUI on a webpage?

    I don't think you can do that in Wt.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Qwt graphics in a webpage?
    By MattPhillips in forum Qwt
    Replies: 1
    Last Post: 11th March 2011, 19:31
  2. Tab functionality on Webpage
    By Fetch in forum Newbie
    Replies: 0
    Last Post: 29th November 2010, 19:01
  3. how to control a webpage via Qt?
    By tamalotes in forum Newbie
    Replies: 13
    Last Post: 7th September 2010, 22:23
  4. qt gui application on webpage
    By bcheruk in forum Qt Programming
    Replies: 4
    Last Post: 23rd April 2009, 20:03
  5. opening webpage using qt....
    By anupamgee in forum Qt Programming
    Replies: 8
    Last Post: 20th April 2009, 11:13

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.