Hello Andrea,
Sorry for the delay as it has been a busy Sunday with several commitments.
I've been trying to implement your proposed solution using different
approaches but still unsucessfully (even after trying different
combinations). From several posts, a potential syntax would be something
lik
ersII)
...you have to set that a layer order should be considered:
tree.setHasCustomLayerOrder(True)
On Wed, Oct 23, 2024 at 6:33 PM coder via QGIS-Developer
mailto:qgis-developer@lists.osgeo.org> > wrote:
Hello
I'm trying to change the rendering order for the layers in the canvas
Hello
I'm trying to change the rendering order for the layers in the canvas with
the aid of QgsLayerTree. The code grabs each layer, checks whether is a
QgsMapLayer instance, and generates a reordered list (layersII). Then, the
code executes:
QgsLayerTree().setCustomLayerOrder(layersII)
but nothin