Hi Martin. <br>Thanks, with this change the qml file is saved.<br><br>Regards.<br><br>Germán<br><br><div class="gmail_quote">El 12 de agosto de 2009 03:19, Martin Dobias <span dir="ltr">&lt;<a href="http://wonder.sk">wonder.sk</a>@<a href="http://gmail.com">gmail.com</a>&gt;</span> escribió:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi German,<br>
<br>
2009/8/12 Germán Carrillo &lt;<a href="mailto:carrillo.german@gmail.com">carrillo.german@gmail.com</a>&gt;:<br>
<div class="im">&gt; Hi all. I&#39;m trying to emulate the symbology dialog for a Python application<br>
&gt; but I have a trouble.<br>
&gt;<br>
&gt; When I&#39;m working with QgsGraduatedSymbolRenderer and I try to save the style<br>
&gt; to a qml file using the saveNamedStyle() method I get the following message:<br>
&gt;<br>
&gt; Could not save symbology because:<br>
&gt;<br>
&gt; renderer failed to save<br>
&gt;<br>
&gt; And in the command line:<br>
&gt; NotImplementedError: QgsGraduatedSymbolRenderer.writeXML() is abstract and<br>
&gt; must be overridden<br>
&gt;<br>
&gt; With the other renderer classes (QgsContinuousColorRenderer,<br>
&gt; QgsSingleSymbolRenderer, QgsUniqueValueRenderer) the saveNamedStyle()<br>
&gt; method  works well and the qml file is saved without any problem.<br>
<br>
</div>I suspect this might be due missing &#39;const&#39; classifier in<br>
QgsGraduatedSymbolRenderer wrapper.<br>
<br>
In python/core/qgsgraduatedsymbolrenderer.sip, line 68:<br>
virtual bool writeXML( QDomNode &amp; layer_node, QDomDocument &amp; document,<br>
QgsVectorLayer&amp; vl ) const;<br>
Try to alter &quot;QgsVectorLayer&amp;&quot; to &quot;const QgsVectorLayer&amp;&quot; and<br>
recompile the bindings.<br>
<br>
If it helps, please give me feedback and I&#39;ll fix it in SVN.<br>
<font color="#888888"><br>
Martin<br>
</font></blockquote></div><br>-- <br>-----------<br>   |\__  <br>(:&gt;__)(<br>   |/    <br><br>Soluciones Geoinformáticas Libres                            <br><a href="http://geotux.tuxfamily.org/">http://geotux.tuxfamily.org/</a><br>
<br>