I know! i was changing to 2.0 api... Natan shown me that
QgsVectorDataProvider.fields() changed from QMap to QList... QMap has
values() method, but QList no... but solution is to erase values()
call beacuse called funcion need a QFields list.

thanks anyway, ginetto

On 28 July 2013 13:34, Alexander Bruy <[email protected]> wrote:
> Hi,
>
> plugin you used is not update to QGIS 2 API changes.
>
> 2013/7/28 Gino Pirelli <[email protected]>:
>> 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
>> [email protected]
>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
>
> --
> Alexander Bruy
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to