[Qgis-developer] pyQgis-question
Bernhard Ströbl
Bernhard.Stroebl at jena.de
Tue Sep 28 02:21:31 EDT 2010
Dear all,
can anybody explain the use of the QgsFeature's changeAttribute() function?
this is my code:
newFeature = QgsFeature()
newGeom = #some geometry-creating function here
newFeature.setGeometry( newGeom )
myLayer.addFeatures( [ newFeature ] )
myLayer.setModified()
newValue = "a string"
myIdx = myLayer.fieldNameIndex( 'myfield' )
newFeature.changeAttribute( myIdx, newValue )
#does not change the field value to new value :-(
what is the second argument of changeAttribute supposed to be?
regards
Bernhard
________ Information from NOD32 ________
This message was checked by NOD32 Antivirus System for Linux Mail Server.
http://www.nod32.com
More information about the Qgis-developer
mailing list