pyQGIS get attribute feilds of a layer

layer_dataProvider=layer.dataProvider()
layer_attrib_names = layer_dataProvider.fields()
attributeList = layer_attrib_names.toList()
for attribute in attributeList:
  print attribute.name()

Leave a Reply

Your email address will not be published. Required fields are marked *


+ four = 10