I want to create several rule based styles on a layer. The rules are very similar, therefore I copy the first one then paste it multiple times and make the slight modifications on the pasted ones. The problem is that the pasted rules don't seem to be independent, rather they seem like they'd be linked somehow. For example, if I turn off the visibility on one, all the others disappear too. It is suspicious that in the project file all the pasted rules have the same "key" string (whatever it is), but the original rule has a different one. Excuse me for the laymans wording, I am not a qgis pro. The version is QGIS Desktop 2.18.4

  • I had the same problem and it solved by just restarting QGIS May 11, 2017 at 14:20

2 Answers 2


The best way to apply same rule on several files is to save the style layer as a new QML file from Layer Properties -> Style (Lower left button) -> Save Style -> QGIS Layer Style File

enter image description here

and load it again on other layers from Properties -> Style (Lower left button) -> Load Style

enter image description here

Then you can adjust the style for each file as you like.

There is also a MultiQml plugin that can be used to apply the same style on several layers at the same time.

  • Thanks for the hint, but what I'd like to do is something way simpler: creating rule based styles on the same layer by copy/pasting one rule.
    – zrx8
    May 12, 2017 at 8:07

The problem still exists in QGIS 3.22.4. There has been an issue earlier: https://issues.qgis.org/issues/17090 Restarting QGIS did not help. Creating a new layer and creating all rules by hand instead of copying and adopting rules worked for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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