[prev in list] [next in list] [prev in thread] [next in thread] 

List:       qgis-developer
Subject:    Re: [Qgis-developer] Add attributes to memory provider with python
From:       Nathan Woodrow <madmanwoo () gmail ! com>
Date:       2011-02-28 12:54:28
Message-ID: AANLkTiks5RTec+FJp9FLSe5DgDHO_bdwUtH78QMALNVu () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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@bd.so.ch>w=
rote:

>  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=FCr Geoinformation
> R=F6tistrasse 4
> 4501 Solothurn
> Telefon 032 627 75 96
> Telefax 032 627 75 98
> stefan.ziegler@bd.so.ch
> http://www.so.ch
>
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>

[Attachment #5 (text/html)]

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.<div><br></div><div>- \
Nathan <br><br><div class="gmail_quote">On Mon, Feb 28, 2011 at 10:50 PM, Ziegler \
Stefan <span dir="ltr">&lt;<a \
href="mailto:Stefan.Ziegler@bd.so.ch">Stefan.Ziegler@bd.so.ch</a>&gt;</span> \
wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex;">






<div>
<div><span style="font-size:10pt">Hi </span></div>
<br>
<div><span style="font-size:10pt">I&#39;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?</span></div>
<br>
<div><span style="font-size:10pt">[1]:
<a href="http://www.qgis.org/pyqgis-cookbook/vector.html#memory-provider" \
target="_blank">http://www.qgis.org/pyqgis-cookbook/vector.html#memory-provider</a></span></div>
 <br>
<div><span style="font-size:10pt">regards
</span><br><span style="font-size:10pt">Stefan</span></div>
<br>
<div><span style="font-size:10pt">Mit freundlichem
Gruss</span><br><span style="font-size:10pt">Stefan
Ziegler</span><br><span style="font-size:10pt">Leiter amtliche
Vermessung</span></div>
<br>
<div><span style="font-size:10pt">Kanton
Solothurn</span><br><span style="font-size:10pt">Bau- und
Justizdepartement</span><br><span style="font-size:10pt">Amt für
Geoinformation</span><br><span style="font-size:10pt">Rötistrasse
4</span><br><span style="font-size:10pt">4501
Solothurn</span><br><span style="font-size:10pt">Telefon 032 627 75
96</span><br><span style="font-size:10pt">Telefax 032 627 75
98</span><br><span style="font-size:10pt"><a href="mailto:stefan.ziegler@bd.so.ch" \
target="_blank">stefan.ziegler@bd.so.ch</a></span><br><span style="font-size:10pt"><a \
href="http://www.so.ch" target="_blank">http://www.so.ch</a></span></div>


<br>



</div>


<br>_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
 <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" \
target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br> \
<br></blockquote></div><br></div>



_______________________________________________
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic