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() newsize.setSize(20) but I haven't yet found the correct way to update the layer's value. it seems like it needs to be passed an entire new `QgsPalLayerSettings` object but I haven't found a way to build a complete object. I've seen `readFromLayer()` but I'm guessing that was a version 2 method that's no longer available in version 3. any pointers or a simple piece of code for updating a layer labelling property would be hugely appreciated. it also occurs to me to ask whether there is anything like: print(layer.renderer().symbol().symbolLayers()[0].properties()) that returns a dict of the layer symbology properties for a label. Another helpful thing would be code that imports a label definition from an exported xml file. thanks, hugh
_______________________________________________ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer