- 
    Suggestion 
- 
    Resolution: Invalid
- 
    P2: Important 
- 
    None
- 
    4.3.0
- 
    None
To be able to interrupt a long-running script, quite a bit of set-up and house-keeping needs to be done on the application side; see attached main.cpp.
In addition to requiring a lot of set-up, relying on QScriptEngine::setProcessEventsInterval() means that any Qt application event will be processed, which might not be what you want. It should be possible to interrupt a script without the side-effect of event processing.
It would be nice if QtScript provided a nicer API for dealing with long-running scripts, e.g. similar to QWebPage::shouldInterruptJavaScript().
- relates to
- 
                    QTBUG-15839 Deprecate QScriptEngine::setProcessEventsInterval() -         
- Closed
 
-