[Qt-interest] Correct use of QScriptContext, and simulating load().
Kent Hansen
khansen at trolltech.com
Mon Apr 26 14:18:57 CEST 2010
Hi David,
David Wilson wrote:
> In order to make this work using QScriptEngine::evaluate(), currently
> I seem to need to pushContext() once at startup in order to get a
> reference to QScriptContext::activationObject(), and then for every
> (possibly recursive) call to load(), call pushContext() and
> setActivationObject() using the reference I previously got a hold of.
>
Why do you need to push another context? Can't you just replace the
activation and this-object of the current context, i.e. like the
"myInclude" function at http://doc.trolltech.com/4.6/qscriptcontext.html
does?
Regards,
Kent
More information about the Qt-interest-old
mailing list