On Mon, Feb 4, 2013 at 9:20 AM, [email protected] <[email protected]> wrote: > Hi Martin, > this is my code: > > vproviderA = vlayerA.dataProvider() > > allAttrsA = vproviderA.attributeIndexes() #vettore contente tutti > gli indici dei campi > > try: > vproviderA.select(allAttrsA) > except: > vproviderA.getFeatures()
You cannot use getFeatures() like this: it returns a feature iterator which you need to use for accessing features - the state of iteration over features is not held there, not in the provider. This is the easiest way to use it: for feature in vproviderA.getFeatures(): type = feature["type"] # do something with type Martin _______________________________________________ Qgis-developer mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-developer
