Integrating native functionality with QT Webkit ?
-
It does.
See:
- http://qt-project.org/doc/qt-5.1/qtwebkit/qtwebkit-bridge.html
- http://qt-project.org/doc/qt-5.1/qtwebkit/qwebframe.html#
I did it this way:
- create a subclass QObject
- expose your properties/methods by using Q_PROPERTY / Q_INVOKABLE
- make an instance of your class available by calling addToJavaScriptWindowObject(name, pointer_to_your_object) on a QWebFrame instance.
- and if you want your object to be available all the times (e.g. after page reload), call addToJavaScriptWindowObject every time the QWebFrame::javaScriptWindowObjectCleared signal is emitted.
I hope this helped.