<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">I work on qgis 1.9 and in the API,
      there is :<br>
      <br>
      <blockquote type="cite">virtual int <a class="el"
href="http://www.qgis.org/api/classQgsLegendInterface.html#a25a8cf67b140383bab0c75e90a3eb3f8">addGroup</a>
        (QString name, bool expand=true, QTreeWidgetItem *parent=0)=0</blockquote>
      I've run this function in Python, and it works for me.<br>
      <br>
      You can try :<br>
      <blockquote type="cite">
        <pre wrap="">li = qgis.utils.iface.legendInterface()
g1 = li.addGroup("g1")
g2 = li.addGroup("g2",True, g2)</pre>
      </blockquote>
      <br>
      <br>
      On 05/15/2013 09:25 AM, David J. Bakeman wrote:<br>
    </div>
    <blockquote cite="mid:51933856.9010900@comcast.net" type="cite">
      <pre wrap="">On 05/14/2013 03:02 PM, David J. Bakeman wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">On 05/14/2013 02:56 PM, Etienne Tourigny wrote:
</pre>
        <blockquote type="cite">
          <pre wrap="">

On Tue, May 14, 2013 at 6:21 PM, David J. Bakeman
<<a class="moz-txt-link-abbreviated" href="mailto:dbakeman@comcast.net">dbakeman@comcast.net</a> <a class="moz-txt-link-rfc2396E" href="mailto:dbakeman@comcast.net"><mailto:dbakeman@comcast.net></a>> wrote:

    Is it possible to create a group within a group in python?

    li = qgis.utils.iface.legendInterface()
    g1 = li.addGroup("g1")
    g2 = li.addGroup("g2",g2)


did you try this? 

g2 = li.addGroup("g2", g1)
</pre>
        </blockquote>
        <pre wrap="">Sorry for the typo yes that is exactly what I tried.  Does it work for
you?
</pre>
      </blockquote>
      <pre wrap="">I built master from source and it doesn't work there either.

P.S. I think this response is in plain text so shouldn't get rejected.
</pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <pre wrap="">


    The above seems like it should work but it doesn't.

    Thanks.

    _______________________________________________
    Qgis-user mailing list
    <a class="moz-txt-link-abbreviated" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a> <a class="moz-txt-link-rfc2396E" href="mailto:Qgis-user@lists.osgeo.org"><mailto:Qgis-user@lists.osgeo.org></a>
    <a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/qgis-user">http://lists.osgeo.org/mailman/listinfo/qgis-user</a>


</pre>
        </blockquote>
        <pre wrap="">


_______________________________________________
Qgis-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/qgis-user">http://lists.osgeo.org/mailman/listinfo/qgis-user</a>
</pre>
      </blockquote>
      <pre wrap="">
_______________________________________________
Qgis-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/qgis-user">http://lists.osgeo.org/mailman/listinfo/qgis-user</a>


</pre>
    </blockquote>
    <br>
  </body>
</html>