I'm using QGIS. I have one qml-file which I apply to many layers of different projects (so all gas-pipes have the same style). As for now, I can make a change to that qml, save it and than I have to go through all projects which contain a gas layer relying on that qml and manually load that updated qml. Is there a way to apply changes to that qml and all gas-pipe layers in all different projects get this updated style automatically?

1 Answer 1


If using shapefile (the gas-pipes are stored in shapefiles): Give the qml-file the same name as the shapefile and QGIS will use that stylefile automatically when loading the shapefile.

Example: You change the appearance (style) of gas-pipe.shp and save the style to gas-pipe.qml. You have 2 other shapefiles for other gas-pipes, let's say their filenames are gas-pipe_wall.shp and gas-pipe_roof.shp. Copy gas-pipe.qml to gas-pipe_wall.qml and to gas-pipe_roof.qml. The next time you open a QGIS-project using gas-pipe_wall.shp and gas-pipe_roof.shp, these gas-pipe-files will be displayed in the same way as gas-pipe.shp.

You may automate the copying and renaming of the qml-file with a batch-file (*.bat) if you work on Windows.

  • thank you, that already makes things a little easier! I'm working with geopakages only though, I will test if that is working the same way!
    – sn1ks
    Jan 9, 2020 at 14:54
  • Please report back and share your geopackage results with the entire community!
    – Stu Smith
    Jan 10, 2020 at 12:35

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.