[webkit-qt] How to add new class to DOM in QtWebKit?

Arunprasad Rajkumar ararunprasad at gmail.com
Wed Jan 23 01:02:17 PST 2013

Hello Developers,

I came to know QtWebKit has the way to add new property to "window"
object using QWebFrame::addToJavaScriptWindowObject(). Really nice &
intuitive because it just takes the QObject & name of the object. MOC
rocks here :)

But I want to add anew Class to the window class, so that it is
instantiate-able from JavaScript.

var a = new MyNativeQtClass();

In the above snippet "MyNativeQtClass" is as a C++/QtClass derived from

How to do that?
*Arunprasad Rajkumar*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-qt/attachments/20130123/698533f5/attachment.html>

More information about the webkit-qt mailing list