I'm using QGIS 3.2.2 and Python. I would like to read out which map theme I currently use.
I know the following method provides me a list of defined map themes ('Theme1', 'Theme2'):
QgsProject.instance().mapThemeCollection().mapThemes()
I don't know any method which provides me with the map theme name used itself.
I tried to use iface.mapCanvas().theme()
but it always returns an empty string.
No comments:
Post a Comment