Important: Please read the Qt Code of Conduct -

Script engine, script value, and threading

  • Lets say I make a QScriptEngine (or QJSEngine, lets not worry about which) and move it to a new QThread. Then later I call evaluate on the script engine and get back a QScriptValue. Assuming the QScriptValue is function (i.e. isFunction() is true), when I use the .call() on the QScriptValue, does it execute in the thread I moved the QScriptEngine to? You can't move the QScriptValue itself because it isn't a QObject subclass.

    I know there is a setProcessEventsInterval - lets leave that out of the conversation for the moment.


Log in to reply