Class: QgsProjectVersion¶
-
class
qgis.core.
QgsProjectVersion
¶ Bases:
sip.wrapper
Creates a new NULL version
QgsProjectVersion(major: int, minor: int, sub: int, name: str = ‘’) Constructor for
QgsProjectVersion
, with the specifiedmajor
,minor
andsub
version numbers.QgsProjectVersion(string: str) Constructor for
QgsProjectVersion
, which parses the version number from astring
.QgsProjectVersion(
QgsProjectVersion
)A class to describe the version of a project. Used in places where you need to check if the current version of QGIS is greater than the one used to create a project file.
Methods
Returns
True
if this is a NULL project version.Returns the major version number.
Returns the minor version number.
Returns the sub version number.
Returns a string representation of the version.
-
isNull
(self) → bool¶ Returns
True
if this is a NULL project version.- Return type
bool
-
majorVersion
(self) → int¶ Returns the major version number.
- Return type
int
-
minorVersion
(self) → int¶ Returns the minor version number.
- Return type
int
-
subVersion
(self) → int¶ Returns the sub version number.
- Return type
int
-
text
(self) → str¶ Returns a string representation of the version.
- Return type
str
-