Qt in Web Browser?

  • Can I build a Qt application, preferably using Qt Creator with QML/C++/JavaScript, that can be run in a web browser such as chrome, firefox, internet explorer and safari? I am NOT interested in using something like Qt WebKit that renders a web view in a Qt application.

  • Lifetime Qt Champion


    Do you mean some sort of plugin ? Or connecting to the application through tcp and have it rendered in a web browser ?

  • I can use HTML5, CSS3, JavaScript, etc. to create web pages, possibly also using PHP, JSP/JSF, etc., in a "mostly" browser-independent way.

    Is there a way to do something comparable with Qt/QML/C++/JavaScript code, possibly adding some minor additional code (such as HTML5, CSS3, etc.), so it will run "unchanged" in multiple different web browsers? I don't want to create browser-specific plugins but would be open to an approach that uses "generic" plugins, TCP (or other IPC protocols), etc.

    Just FYI, I looked at PHP-Qt (which stopped about 5 years ago), FireBreath (for cross-browser plugins), and many others. I've also looked at KDE and Cocos2d-x as alternatives or complementary to Qt. I've even looked at numerous other systems/tools/frameworks/IDEs.

    I'm interested in the answers to the following questions:

    1. Can apps be developed with Qt that run in web browsers (e.g., chrome, firefox, internet explorer and safari)?

    2. If so, what are viable approaches that require "minimal" additional effort?

    If browser apps can be developed with Qt, can one code base, with possibly some minor modifications, also be deployed to Android and iOS platforms?


  • Lifetime Qt Champion

    IIRC there's a project called Vaudeville to render a Qt application on a html canvas that could be of interest to you

  • Moderators

    if you want to actively run the Qt application in the web-browser - meaning with the possibility of interaction - the browser has to execute the native code. Thus a browser plugin is necessary.
    IIRC for the most browsers (Firefox, Chrome, ...) the netscape plugin interface needs to be implemented. For IE browsers a ActiveX control needs to be implemented and registered in the system (regsrv).
    But i don't know whats the future of plug-in interfaces is anyway. Currently it seems that support for such plugins will be dropped sooner or later.

    For example chrome drops netscape plugin support with new blink engine. Also microsoft removes it's activeX plugin capablities in IE browsers.

  • Qt mobility has Qt service framework which could satisfy your needs. If you do not use Qt mobility at all, could go with NP(netscape) plugins and expose NPAPI in native side, then javascript could call these APIs in browser. NP API suppose to be supported by most of all popular browsers.

Log in to reply

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