[Qgis-user] Re: [Qgis-developer] SEXTANTE for QGIS has been
released
Martin Dobias
wonder.sk at gmail.com
Mon Apr 2 07:43:12 EDT 2012
On Mon, Apr 2, 2012 at 1:34 PM, Alexander Bruy <alexander.bruy at gmail.com> wrote:
>
> minQtVersion = '4.6.0'
>
> def initGui(self):
> if qVersion() < minQtVersion:
> QMessageBox.warning( self.iface.mainWindow(), "Error", "Your message")
> self.loadingCanceled = True
> return None
Hi Alex
there may be a problem with above code. Imagine that PyQt4 is built
with e.g. Qt 4.2 - that means that it will provide only methods
available in Qt 4.2 and below. If the user updates Qt version to 4.8,
the new methods and classes will not be available in PyQt4, however
qVersion() will return '4.8.0'. There is also PYQT_VERSION_STR
variable in PyQt4.QtCore that returns the version of Qt used to build
PyQt.
Martin
More information about the Qgis-developer
mailing list