Questions tagged [layertree]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
1answer
393 views

Updating Layer tree after changing symbology with PyQGIS

When I change symbology for a given QgsVectorLayer (QGIS 2.14.16 LTR) by r=iface.activeLayer().rendererV2() r.symbol().symbolLayers()[0].setColor(0,0,255,255) as shown here: and refreshing the map ...
4
votes
1answer
847 views

Re-order layers in QGIS table of contents using python

I am using the following code in a script tool to import a set of shapefiles from a folder specified by the user, duplicate two of the layers, style all of them and re-order them in the layers panel. ...
3
votes
1answer
339 views

Choosing layers to dump in legend for a standalone application

I'm writing a standalone application using QGIS API to export maps automatically as pdf. When I'm building my QgsComposition, I have an issue: I have already built a list with the layers I want to ...
3
votes
1answer
856 views

PyQGIS refresh layer tree programmatically

When programmatically applying a subset string to a vector layer (here: ax_flurstueck with object count 34265) via l = iface.activeLayer() l.setSubsetString('gemarkungsnummer in ('2760','2765','2771'...