[Interest] Running Qt app in a browser

Jason H jhihn at gmx.com
Tue Apr 26 15:45:03 CEST 2016

> Sent: Monday, April 25, 2016 at 4:59 PM
> From: "Larry Martell" <larry.martell at gmail.com>
> To: interest at qt-project.org
> Subject: [Interest] Running Qt app in a browser
> Is it possible to run a Qt app in a browser? I have googled for this,
> and found some hits, but none seen like they ever worked out. The most
> promising seems to be http://wiki.qt.io/Qt_for_Google_Native_Client
> but the readme link is broken, so that's discouraging. Anyone have any
> pointers on if this can be done and if so how?

1 . Someone already mentioned Wt, I have used Wt, and Qt, and even tried to merge the two a little by patching uic to produce Wt code from the .ui files. It worked ok, not 100%. I am very happy with WT, but I prefer making REST servers so that web and non-web mobile (QML?) clients can use them. 

2. I had proposed and worked on for a short while a project called vaudeville, which would enable QPainter with with a HTML Canvas painter. It worked really well in terms of pixel-perfect, but the fonts were not. They were good, but the pixel hinting was a little different. That would be the closest to what you want that isn't NaCL. But that only got so far as an engineering level test. QPA (what I would need to plug it into Qt properly) was still very much in flux at the time. I postponed it and ever got back to it.

3. You might want to look at QxtWeb. ( http://libqxt.bitbucket.org/doc/tip/qxtweb.html ) You'll get more code re-use, but you'll have to code a special web client yourself. However, to the rescue, is QMLWeb, which is QML compatible, would allow you to produce some degree of QML re-usable code .

4. A final option is asm.js, you could (in theory, I've not tried this) load all of the Qt in a browser and run it through ASM.js ( http://asmjs.org/ ) Check out the slide deck which specifically mentions Qt.

That's about all there is. My current MO is a NodeJS REST server and AJAX to the various clients, in whatever they are (QML/HTML usually)

More information about the Interest mailing list