[Qgis-developer] QgsFields has not method values()
Alexander Bruy
alexander.bruy at gmail.com
Sun Jul 28 04:34:42 PDT 2013
Hi,
plugin you used is not update to QGIS 2 API changes.
2013/7/28 Gino Pirelli <luipir at gmail.com>:
> Hi
>
> what was the result of QgsFields.values()? I've no documentation in
> master and in 1.8!
>
> I've this error in a plugin:
>
> File "/home/ginetto/.qgis2/python/plugins/rt_postgres_extractor/WizPage1.py",
> line 187, in fillLayerAttrsCombo
> self.layerAttrsCombo.addItems( self.getFieldNames4Combo(flds.values()) )
> AttributeError: 'QgsFields' object has no attribute 'values'
>
> from this code:
>
> pr = layer.dataProvider()
> flds = pr.fields()
> self.layerAttrsCombo.addItems( self.getFieldNames4Combo(flds.values()) )
>
> where layer is a QgsVectorLayer => pr is a QgsVectorDataProvider
>
> ciao ginetto
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
--
Alexander Bruy
More information about the Qgis-developer
mailing list