Hi Alexandre,
When the layer is a PostgreSQL layer, it's the method from
QgsVectorLayer which is called:
https://qgis.org/pyqgis/3.32/core/QgsVectorLayer.html#qgis.core.QgsVectorLayer.loadNamedStyle
https://api.qgis.org/api/classQgsVectorLayer.html#a2bd3a21badac411179dbfbc724136a45
The docu
I am trying to load a style from a QML file into a vector layer.
When I use a memory layer, loading the style works fine with the following code:
layer = iface.activeLayer()
layer.loadNamedStyle(path_to_style)
If the layer is a postgreSQL layer with a default style, the above code will
return: