Table Of Contents

Previous topic

QScriptEngineAgent

Next topic

QScriptString

QScriptProgram

Inheritance diagram of QScriptProgram

Note

This class was introduced in Qt 4.7

Synopsis

Functions

Detailed Description

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);
class PySide.QtScript.QScriptProgram
class PySide.QtScript.QScriptProgram(other)
class PySide.QtScript.QScriptProgram(sourceCode[, fileName=""[, firstLineNumber=1]])
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 .

PySide.QtScript.QScriptProgram.fileName()
Return type:unicode

Returns the filename associated with this program.

PySide.QtScript.QScriptProgram.firstLineNumber()
Return type:PySide.QtCore.int

Returns the line number associated with this program.

PySide.QtScript.QScriptProgram.isNull()
Return type:PySide.QtCore.bool

Returns true if this PySide.QtScript.QScriptProgram is null; otherwise returns false.

PySide.QtScript.QScriptProgram.__ne__(other)
Parameters:otherPySide.QtScript.QScriptProgram
Return type:PySide.QtCore.bool

Returns true if this PySide.QtScript.QScriptProgram is not equal to other ; otherwise returns false.

PySide.QtScript.QScriptProgram.__eq__(other)
Parameters:otherPySide.QtScript.QScriptProgram
Return type:PySide.QtCore.bool

Returns true if this PySide.QtScript.QScriptProgram is equal to other ; otherwise returns false.

PySide.QtScript.QScriptProgram.sourceCode()
Return type:unicode

Returns the source code of this program.