Re: [QGIS-Developer] pyqgis labelling settings

2022-11-10 Thread Francisco Puga via QGIS-Developer
You can try iface.layerTreeView().refreshLayerSymbology(layer.id()) El mié, 9 nov 2022 a las 18:53, Hugh Kelley () escribió: > I finally found time to try this and it worked very well. Thank you! > > one follow up question I have is that I can make the change visible by > running layer.triggerRe

Re: [QGIS-Developer] pyqgis labelling settings

2022-11-09 Thread Hugh Kelley via QGIS-Developer
I finally found time to try this and it worked very well. Thank you! one follow up question I have is that I can make the change visible by running layer.triggerRepaint(). That does not refresh the values in the layer styling panel. I need select a different layer and then select the original in

Re: [QGIS-Developer] pyqgis labelling settings

2022-10-23 Thread Francisco Puga via QGIS-Developer
This should work when working with SingleLabels layer = iface.activeLayer() settings = layer.labeling().settings() textFormat = settings.format() textFormat.setSize(20); settings.setFormat(textFormat) layer.labeling().setSettings(settings) hope it helps El vie, 21 oct 2022 a las 18:18, Hugh Kell

[QGIS-Developer] pyqgis labelling settings

2022-10-21 Thread Hugh Kelley via QGIS-Developer
Hi, I'm hoping to make some scripts for labelling layers. I've found the basic labelling settings in layer = iface.activeLayer()layer.labeling().settings().format().size() for example, and it seems that I could be able to update that with an object like newsize = QgsTextFormat() ne