Thursday, 19 December 2019

python - Programmatically styling layer after output is returned from QGIS 3 processing script?


Hi this may be more of a python question rather than qgis processing script question. I've managed to successfully get the output that I want from my processing script, but I wish to take one step further and style it automatically with a saved qml file.


The code below doesn't work because the return ends my script. How should I go about doing this?



return {self.OUTPUT: dest_id}
iface.activeLayer().loadNamedStyle('Buffer.qml')
iface.activeLayer().triggerRepaint()


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...