Graphics Reference
In-Depth Information
Data type
Description
long
A standard Python long integer value
float
A standard Python floating point (real) number
A Boolean value ( true or false )
bool
QString A string value. Note that the QGIS Python wrappers automatically convert Python strings to C++ strings, so you don't need to
deal with QString objects directly
This object is used to encapsulate a list of other objects. For example, QList<QString*> represents a list of strings
QList
Just as in Python, a method can take default values for each parameter. For example, the
QgisInterface.newProject() method looks like the following:
In this case, the thePromptToSaveFlag parameter has a default value, and this de-
fault value will be used if no value is supplied.
In Python, classes are initialized using the __init__ method. In C++, this is called a
constructor . For example, the constructor for the QgsLabel class looks like the follow-
ing:
Search WWH ::




Custom Search