On QGIS, I would like to programmatically assign multiple .qml styles to a single layer with python.

I can add styles manually from the Properties dialog on the layer by selecting Styles->Add... but I cannot add them from a .qml

So the question is two-fold:

  1. How to add programmatically a second, third, etc style for the layer.
  2. If the new styles can be added from saved .qml's

So far my knowledge is limmited to loading one individual .qml with

  • 1
    What exactly do you mean with multiple styles in one layer, classifications? QML is a KML type file. Maybe you want to try to parse them together into a single *.qml and load that one? Oct 14 '16 at 9:52

Browse other questions tagged or ask your own question.