Note
This class was introduced in Qt 4.7
The PySide.QtScript.QScriptProgram class encapsulates a Qt Script program.
PySide.QtScript.QScriptProgram retains the compiled representation of the script if possible. Thus, PySide.QtScript.QScriptProgram can be used to evaluate the same script multiple times more efficiently.
QScriptEngine engine; QScriptProgram program("1 + 2"); QScriptValue result = engine.evaluate(program);
| Parameters: |
|
|---|
Constructs a null PySide.QtScript.QScriptProgram .
Constructs a new PySide.QtScript.QScriptProgram that is a copy of other .
Constructs a new PySide.QtScript.QScriptProgram with the given sourceCode , fileName and firstLineNumber .
| Return type: | unicode |
|---|
Returns the filename associated with this program.
| Return type: | PySide.QtCore.int |
|---|
Returns the line number associated with this program.
| Return type: | PySide.QtCore.bool |
|---|
Returns true if this PySide.QtScript.QScriptProgram is null; otherwise returns false.
| Parameters: | other – PySide.QtScript.QScriptProgram |
|---|---|
| Return type: | PySide.QtCore.bool |
Returns true if this PySide.QtScript.QScriptProgram is not equal to other ; otherwise returns false.
| Parameters: | other – PySide.QtScript.QScriptProgram |
|---|---|
| Return type: | PySide.QtCore.bool |
Returns true if this PySide.QtScript.QScriptProgram is equal to other ; otherwise returns false.
| Return type: | unicode |
|---|
Returns the source code of this program.