I'am working on a plugin which is loading layers automatically. When the layers are loaded they should get categorized. I done it with svg files but i have more symbols in my Style Manager which I want to use for the categorization. Do anybody know how I can read all symbols out of the Style Manager? I use QGIS 3.0
You can access the default style library via
This gives you a QgsStyle object (see https://qgis.org/pyqgis/3.0/core/other/QgsStyle.html). From there, you can call methods like
style=QgsStyle.defaultStyle() style.symbolNames() # returns a list of symbol names style.symbol('dash blue') # returns the symbol with name 'dash blue'