QScriptProgram Class
The QScriptProgram class encapsulates a Qt Script program. More...
| Header: | #include <QScriptProgram> |
| qmake: | QT += script |
| Since: | Qt 4.7 |
This class was introduced in Qt 4.7.
Detailed Description
QScriptProgram retains the compiled representation of the script if possible. Thus, QScriptProgram can be used to evaluate the same script multiple times more efficiently.
QScriptEngine engine; QScriptProgram program("1 + 2"); QScriptValue result = engine.evaluate(program);