I have created a QGIS project template file and gone through the style manager to create all my necessary styles I would like in my template; but when another user uses 'New from template' they still need to import the styles - is there a way to include the styles within the template to save a step?


To include the styles in your project, you need to define and save your style in project file (or in .qml , .SLD file or a database) from your layer properties. Then your style will be applied automatically to the layers when you open the project.

You can achieve this goal using the Style combobox at the bottom of the Layer Properties dialog with the add option.

Add: A new style is created using the current options. By default, it will be saved in the QGIS project file.

here is the manual user page about managing custom default style

  • Thanks, that's very helpful but I'm not sure it will solve what I'm trying to accomplish. Just to elaborate a little - I currently have several dozen styles set up and grouped logically in my style manager, but I want to be able to share those styles and groupings with others on my network (and if possible, be populated when using 'new from template' without the need of importing) I've exported an .xml file from my style manager which includes all the styles and can be manually imported on another user's machine, but the groupings are not included. – CEL-ma Nov 1 '17 at 12:45
  • 1
    if you need to share the style manager structure as well, you should share a db file named symbology-ng-style.db. You will find xml symbol table on it and groupes, tag and so on. this file should be located under the personal's user folder called .qgis2 on windows. If you share this db to other user, they will get the same structure as you. Same for project template that should be located under a folder you configured in option>general tab. When a user will open from template, he will get automatically layers loaded (if they are greatly path configured) and symbolized from the same symbol – Hugo Roussaffa - GeoDatup Nov 1 '17 at 14:23
  • Thanks! That's exactly what I was looking for - I was able to share the .db file and it worked as you mentioned. Would be nice if there was a way to associate it with the template project file though (or map it in the options like you do with the template file) so it's loaded automatically. – CEL-ma Nov 1 '17 at 14:38
  • you mean to use different db depending of the project ? – Hugo Roussaffa - GeoDatup Nov 1 '17 at 14:44
  • I though the db will be loaded automatically on every project the user will load. – Hugo Roussaffa - GeoDatup Nov 1 '17 at 14:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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