[Qgis-user] Re: [Qgis-developer] SEXTANTE for QGIS has been released

Alexander Bruy alexander.bruy at gmail.com
Mon Apr 2 07:34:22 EDT 2012


Hi Victor,

you can use qVersion() macro to get Qt version. Something like
this

minQtVersion = '4.6.0'

def initGui(self):
    if qVersion() < minQtVersion:
      QMessageBox.warning( self.iface.mainWindow(), "Error", "Your message")
      self.loadingCanceled = True
      return None

 def unload(self):
    if self.loadingCanceled:
      return

2012/4/2 Victor Olaya <volayaf at gmail.com>:
> Thanks Radim
>
> That means that some distributions of QGIS might have a QT version
> lower that 4.7? The one I am using works fine, so i gues is > 4.7. Is
> there any way of checking it on the fly, so I can execute that line
> only if the version is recent enough?

-- 
Alexander Bruy


More information about the Qgis-developer mailing list