Re: [Qgis-developer] addAttribute to memory layer

2013-10-08 Thread Gino Pirelli
explication is in the code http://www.qgis.org/api/qgsvectorlayer_8cpp_source.html#l03192 it' important to follow the emitted signal and related listener to know exactly all involved cmponents ciao ginetto On 8 October 2013 10:04, Ing. Pierluigi De Rosa < pierluigi.der...@gfosservices.it> wr

Re: [Qgis-developer] addAttribute to memory layer

2013-10-08 Thread Ing. Pierluigi De Rosa
Thanks Alessando, It was what I was looking for. My error was I didn't updated fields using: vectorlayer.updateFields() Why it is necessary to call it when a field is added into provider? Thanks Pierluigi Il giorno lun, 07/10/2013 alle 10.51 +0200, Alessandro Pasotti ha scritto: > You can try

Re: [Qgis-developer] addAttribute to memory layer

2013-10-07 Thread Alessandro Pasotti
2013/10/7 Ing. Pierluigi De Rosa > ** > Dear All, > I'm converting a plugin with new API but I still doen't figure out how to > add attribute to feature. > I know it's a stupid question but i think the cookbook is till not updated? > http://qgis.org/it/docs/pyqgis_developer_cookbook/vector.html#a

[Qgis-developer] addAttribute to memory layer

2013-10-07 Thread Ing. Pierluigi De Rosa
Dear All, I'm converting a plugin with new API but I still doen't figure out how to add attribute to feature. I know it's a stupid question but i think the cookbook is till not updated? http://qgis.org/it/docs/pyqgis_developer_cookbook/vector.html#add-features I tried this code without success: