Bug report #21880
Style file (QML) can't be used to add styles to rasters
|Affected QGIS version:
|Pull Request or Patch supplied:
|Crashes QGIS or corrupts data:
|Copied to github as #:
When styling raster files using QML file through 'Load style' button in Symbology panel, after clicking OK or Apply button, a default style gets applied and QML file is discarded.
Loading Style from QML file
After clicking the apply button
The only work around is to rename the style file to the same name as raster and place it in same folder. Still if you click ok or Apply button in symbology panel, the style changes to a default one.