<p dir="ltr">hi denis I dont have the new api completely in mind, but maybe this [0]<br>
can help you.</p>
<p dir="ltr">[0] <a href="http://lists.osgeo.org/pipermail/qgis-developer/2013-February/024278.html">http://lists.osgeo.org/pipermail/qgis-developer/2013-February/024278.html</a></p>
<p dir="ltr">Marco Bernasocchi (mobile)<br>
<a href="http://opengis.ch">http://opengis.ch</a></p>
<div class="gmail_quote">On May 6, 2013 11:27 AM, "Denis Rouzaud" <<a href="mailto:denis.rouzaud@gmail.com">denis.rouzaud@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi all,<br>
<br>
I got a crash when I did this:<br>
<br>
fields = layer.dataProvider().fields()<br>
f = QgsFeature()<br>
f.setFields(fields)<br>
for field in fields:<br>
f[<a href="http://field.name" target="_blank">field.name</a>()] = QVariant("1")<br>
<br>
Using QVariant or not.<br>
<br>
What did I (again) did wrong ????<br>
<br>
Greetings,<br>
<br>
Denis<br>
______________________________<u></u>_________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org" target="_blank">Qgis-developer@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/qgis-<u></u>developer</a><br>
</blockquote></div>