Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# for testing in QGIS console
style_name = 'Druckstufen'
layer=iface.activeLayer()
stylemanager = layer.styleManager()
current_style = stylemanager.currentStyle()
#print(curr_style)
# stil nur wechseln wenn nicht schon aktuell eingestellt
if style_name != current_style:
stylemanager.setCurrentStyle(style_name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment