I have a vector layer in QGIS and using
pyqgis I have created two styles/renderers:
style_1 = QgsFeatureRendererV2(...) style_2 = QgsFeatureRendererV2(...) vector_layer.setRendererV2(style_1)
One of the styles is assigned to the vector layer and the other one is for later use.
Saving the QGIS project will store
style_1 with the layer but the second style will be lost if the project is closed. I would like to store the second style in the QGIS project file, not in a seperate style file.
QgsProject.writeEntry(...) I can store numbers, texts and lists in the QGIS project file.
Is there a corresponding method for storing custom styles/renderers in the QGIS project file?