Hi Akbar

On Tue, Jul 12, 2016 at 7:49 PM, Akbar Gumbira <[email protected]> wrote:
> Hi,
>
> I am trying to add symbols/colorramps through Python API and I have a
> problem that after adding symbol/colorramps, the added symbols/colorramps
> don't show up in Style Manager right away. The symbols are added in the
> symbology-ng-style.db, but the added symbols show up once I restart QGIS

Try this instead:

style = QgsStyleV2.defaultStyle()
style.addSymbol("ABC", my_symbol)

The default style is the one loaded on start and used throughout QGIS
application, so if you modify it, the changes will be immediately
visible in the GUI and will be saved automatically.

Cheers
Martin
_______________________________________________
Qgis-developer mailing list
[email protected]
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to