2

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

2

This solution helped me. My problem is solved.

iface.layerTreeView().refreshLayerSymbology( iface.activeLayer().id() )
| improve this answer | |

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