[Qgis-user] Ho retrieve the attributealias list
Andrea Peri
aperi2007 at gmail.com
Mon Nov 2 05:28:39 PST 2015
Hi,
I need to retrieve a list of attribute alias.
To do this, I try this code:
for lid, orientation in self.templateTable.model().getObjectIter():
layer = QgsMapLayerRegistry.instance().mapLayer(lid)
for idx, fld in enumerate(layer.attributeList()):
...
The qgis report me this error:
for idx, fld in enumerate(layer.attributeList()):
AttributeError: 'QgsVectorLayer' object has no attribute 'attributeList'
But I see the AttributeList is available in that clas as reported from the
help.
http://www.qgis.org/api/classQgsVectorLayer.html#a9fdee4a58551d7e1424c8f66ab6c14a0
Perhaps I'm wrong something or the documentation API is obsolete ?
Thx.
--
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
More information about the Qgis-user
mailing list