Launching a qt app from a .html file
-
Hey all,
I was wondering if it is possible to launch a Qt5 application from a .html file.
the scenario:
I have a web browser I made in Qt5 and a web site (.html file) that is rendered in a QWebView. The web site has a bunch of buttons corresponding to web apps on it. Is it possible to set it up so that I can click one of the buttons on the html site and launch a new window with a QWebView and possibly other widgets in it? This new window would load the URL of the web app. -
This is definitely possible. Please look at Qt, JavaScript and Web-kit integration. This should help. If you need an example do let me know. I can provide you in email.
-
You can expose QObject in the JS world. Look into Webkit bridge. http://qt-project.org/doc/qt-5.0/qtwebkit/qtwebkit-bridge.html
-
okay thanks! It really helps. Ill check out the examples. Oh, do either of you know of any open-source projects that utilize qt and web integration?
Thanks again!
-
QML/Webkit2 project : https://github.com/penk/SlateKit
Another one is http://code.google.com/p/arora/
http://blog.qt.digia.com/blog/2011/12/20/orange-helium-a-lightweight-qtwebkit-based-browser/