You should be able to do that using QScriptContext::callee().
You should be able to do that using QScriptContext::callee().
And how should I do that then?
So when I call callee() I get the function being called, but how do I get it's name (which should equal the property)?Use callee() to obtain the QScriptValue that represents the function being called. This can for example be used to call the function recursively.
First of all you can probably store some data of yours there using QScriptValue::setData() while registering the function. If you want to know the function name directly, you'll have to dig into the internals of QScriptValue yourself. Qt sources may be very helpful here.
Bookmarks