[Qt-interest] returning a QObject to javascript in WebKit
Paul Dixon
lordelph at gmail.com
Tue Jun 2 23:29:12 CEST 2009
I've added an object to a QWebFrame with addToJavaScriptWindowObject,
and successfully called a slot on that object from javascript.
I'm having trouble getting that slot to return a new object.
My object has a slot with a little like this
MyObject* MyApp:helloWorld()
{
//MyObject is dervied from QObject
return new MyObject();
}
My js successfully calls this slot like this
foo=myapp.helloWorld();
But I foo appears to be empty, I can't call any slots or access any
properties on it from js.
Ideas welcome!
More information about the Qt-interest-old
mailing list