On Mon, Apr 2, 2012 at 1:34 PM, Alexander Bruy <alexander.b...@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 _______________________________________________ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user