[Qgis-developer] Add attributes to memory provider with python

Nathan Woodrow madmanwoo at gmail.com
Mon Feb 28 07:54:28 EST 2011


Try setting the layer editable and then turning editing off.  There seems
(too me) to be a bug in the refreshing of the attributes on memory layers.

- Nathan

On Mon, Feb 28, 2011 at 10:50 PM, Ziegler Stefan <Stefan.Ziegler at bd.so.ch>wrote:

>  Hi
>
> I'm trying to add some attributes to a memory provider but with no luck. I
> pasted the code from the cookbook [1] into the python console. The layer
> with the feature is added but there are no attributes in the layer. Did I
> miss something? Has something changed?
>
> [1]: http://www.qgis.org/pyqgis-cookbook/vector.html#memory-provider
>
> regards
> Stefan
>
> Mit freundlichem Gruss
> Stefan Ziegler
> Leiter amtliche Vermessung
>
> Kanton Solothurn
> Bau- und Justizdepartement
> Amt für Geoinformation
> Rötistrasse 4
> 4501 Solothurn
> Telefon 032 627 75 96
> Telefax 032 627 75 98
> stefan.ziegler at bd.so.ch
> http://www.so.ch
>
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20110228/84303653/attachment.html


More information about the Qgis-developer mailing list