This question already has an answer here:
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?