1

I have created a Spatialite database with several layers. I have customised the style for each layer and have saved the style as the default style in the database. All works fine when I connect to this Spatialite database and load the layers.

But after I have copied the Spatialite file to a new location, loading the layers results in reversion to the default system styles, and the customised styles are lost.

3

First check that the layer styles not actually lost from your database (is there a table called layer_styles and does it have information?)

If there is layer styling information in your database but the style doesn't load or can't be accessed using styling panels in QGIS, then check whether the column f_table_catalog in the layer_styles table is blank.

If it is blank you will need to manually specify the path of the database; it's a known bug in 2.18.x. Refer to QGIS default style stored in spatialite db does not load when adding layer

If there is no information at all then you have indeed lost the styling information somehow but I am going to guess that this is not the case (hopefully).

0

The f_table_catalog in the layer_styles table was not blank. But as given in the link provided by you, the reference to the database was incorrect after the file had been moved. Restoring the correct references solved the problem. Thanks for your help.

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.