[webkit-qt] Can I return MyQObject from a slot.

Mital Vora mital.d.vora at gmail.com
Sat Nov 28 10:06:28 PST 2009


hey guys,

I am a newbie to Qt. I am trying to Inject my custom Object in JavaScript
space using QWebFrame::addToJavaScriptWindowObject( ) method. I have few
doubts related to this.

1) can I return custom datatype (a class derived from QObject) MyQObject
from a slot.

2) can I set MyQObject2 as property of MyQObject1 such that In javascript I
am able to access various properties of MyQObject2 using
myQObject1.myQObject2.prop1.

3) can I do things like "var obj = new MyQObject(["abc", 1]);" using the new
operator to create a new object of a particular type.

I am able to do all these using JavaScriptCore in windows. Please help me
figure out how should I do it using Qt.

Thanks in advance,

Mital Vora.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-qt/attachments/20091128/fe130953/attachment.html>


More information about the webkit-qt mailing list