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 <[email protected]>:
> 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
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to