2

I am trying to create 'template' shapefiles. I edited the attribute forms and changed the widget types (ex. value map) with custom values. When I try to export the shapefile this way

enter image description here

enter image description here

I end up with default widgets when I try to use the shapefiles in a new project.

1 Answer 1

2

You additionally have to save the layer style to a .qml file. Widgets and forms are saved there.

5
  • Thanks for the quick reply. Do I have to manually load style for each individual layer each time I try to set up a project? Commented Oct 5, 2021 at 14:12
  • If you save the .qml using the same name as the shape to the same location, it will be loaded when you load the shapefile to your QGIS. Easiest way to achieve this is to hit the little style button at the bottom of the layer properties window and choose save as default.
    – Erik
    Commented Oct 5, 2021 at 14:19
  • I see. As of right now, the way we set up project is through importing the template shapefiles into a brand new QGZ project then manually export each shapefile into the proper project's folder with a different name (from "Linelayer Template" to "Linelayer ABC1" for example) then deleting the previously imported layers from the project in that intance would the default style file still apply ? Commented Oct 5, 2021 at 14:24
  • Nope, then you'd need to load it again. Why don't you use the Explorer to copy the shapes to the project folder, rename and then load them?
    – Erik
    Commented Oct 5, 2021 at 14:26
  • Ohh, so the style file is only tied to the shapefile as opposed to a project! I'd only have to batch rename all the files including the style files then just load them into the project for everything to work. That'd make things faster. edit: Thank you for your insight! Commented Oct 5, 2021 at 14:33

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.