Hi Benoît,

would you mind sharing your hole script as reference for others?
I think you touched a common problem which isn't covered with built-in functions yet, and not everyone is gifted with profound coding abilities in python (like me ;) )

Cheers
Bernd


Am 20.05.2015, 15:16 Uhr, schrieb Benoît Laurent <[email protected]>:

I eventually managed to solve my problem. In case somebody encounters the same or a similar one, I provide my solution: I used a >Python script iterating over the groups. Apparently, it is not possible (or I failed) to refresh the mapCanvas during the Python >script. Instead of using "legend.setLayerVisible(layer, True)", I played with symbols:

layers[2*g].rendererV2().symbol().setWidth(2)
layers[2*g].rendererV2().symbol().setAlpha(1)

There were others problems in my code but the main difficulty lied there. Symbols can be updated during Python scripts and it >perfectly meets my needs.

Regards,

Benoît

        
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
www.avast.com





--
Erstellt mit Operas E-Mail-Modul: http://www.opera.com/mail/
_______________________________________________
Qgis-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to