On Mon, Apr 2, 2012 at 9:59 AM, Victor Olaya <vola...@gmail.com> wrote: > 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?
Hi Victor in Python you can use 'hasattr' builtin function: edit = QLineEdit() if hasattr(edit, 'setPlaceholderText'): edit.setPlaceholderText('foo') Cheers Martin _______________________________________________ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user