I have saved a style as qml file. I try to set the style for a raster layer in python directly. For this, I use function "loadNamedStyle". After the call, the color themes are updated in my model but the description text under the raster layer is still not updated. My question, how can I refresh the information?

enter image description here


1 Answer 1


This solution helped me. My problem is solved.

iface.layerTreeView().refreshLayerSymbology( iface.activeLayer().id() )

Not the answer you're looking for? Browse other questions tagged or ask your own question.