1

I've followed this post, using the QGIS Desktop Python Console, to create color ranges for my vector layer. QGIS displays a nice selectable tree in the Layers Panel.

Layers Panel

Now I want to develop my own app, instead of playing in the console. How can I replicate this tree? If I only had top-level layers, I think it would be straightforward to get the list of layers from QgsMapLayerRegistry and populate my own widget. But the ranges add complexity. As far as I can tell, the sub-layers exist only in the renderer, so do I really need to dig through the renderer's items somehow?

I'm stuck with QGIS v2.18 and PyQt4 in case it matters.

closed as unclear what you're asking by Jochen Schwarze, Andre Silva, HDunn, ahmadhanb, Erik Apr 23 at 9:38

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

Browse other questions tagged or ask your own question.