Dear all,

I have a question regarding the possibilty of reading the body of a javascript function from c++. I want to create a DSL based on QML and I have to read the body of a javascript function.

e.g.

QML:
 Item {
     function action() {
         console.log("Got message:", msg)
         return "some return value"
     }
 }

C++:
QDeclarativeEngine engine;
QDeclarativeContext context(&engine);

QDeclarativeComponent component(&engine, QUrl::fromLocalFile("MyItem.qml"));
QObject* qmlSpenat = component.beginCreate(&context);

QString actionString=qmlSpenat->property("action");//??? it doesn't work, anything else?

Regards
Andy
_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to