4

I want to change the style of the polygon contained in the vector layer. Is there any API available?

(I can click the properties of the shapefile, then select the style and change the symbol properties, but I want to do this programmatically.)

I am using Python to customise QGIS.

katahdin
  • 2,534
  • 1
  • 23
  • 26
Vicky
  • 1,852
  • 3
  • 22
  • 28

1 Answers1

3

The documentation can be found here: http://www.qgis.org/pyqgis-cookbook/vector.html#appearance-symbology-of-vector-layers

I haven't tried it yet, so I cannot provide any further pointers but the code examples there look good to go.

underdark
  • 84,148
  • 21
  • 231
  • 413
  • when we try to access class 'QgsMarkerSymbolLayerV2' from the python console inside the QGIS , It showed me that 'class doesn't exist' I am using QGIS 1.7 – Vicky Nov 05 '11 at 10:26
  • Works for me (running 1.7.1): >>> QgsMarkerSymbolLayerV2 <class 'qgis.core.QgsMarkerSymbolLayerV2'> – underdark Nov 05 '11 at 11:29