[Qgis-user] Find group of a layer in Python plugin

Martin Dobias wonder.sk at gmail.com
Sun May 30 03:49:10 PDT 2010


On Fri, May 28, 2010 at 11:02 PM, Ron Bentley <rtbentley at gmail.com> wrote:
> I'm sure the answer is right in front of me; I just haven't found it yet:
>
> Given a layer, is there any way to find out if the layer is part of a group
> in the legend, and if so which group -- from inside a Python plugin?  QGis
> 1.4.0 here.

Hi Ron

there's a QgsLegendInterface class available for this kind of tasks.
Unfortunately it currently doesn't have such functionality, though we
would welcome any patches that add such functionality.

Regards
Martin



More information about the Qgis-user mailing list