[Qgis-developer] [PyQGIS] - Change VertexMarkerType

Martin Dobias wonder.sk at gmail.com
Tue Feb 22 04:12:31 EST 2011


On Mon, Feb 21, 2011 at 11:43 PM, Salvatore Larosa <s_larosa at libero.it> wrote:
>
> Hello everyone,
> I'm making an application on the basis of that reported by Martin on the
> cookbook PyQGIS Documentation,
> which take this opportunity to thank!
>
> I added a button "toggle editing" to enable or disable the editing of a
> feature.
>
> I wanted to ask,
> how can I change the Vertex Marker from Cross to SemiTransparentCircle?

Hi Salvatore

to use semi-transparent circles as vertex markers:

settings = QSettings()
settings.setValue("/qgis/digitizing/marker_style", "SemiTransparentCircle")

That code can be put somewhere in the application's initialization.
Other values are "Cross" and "None". You can also change the size of
the marker:

settigs.setValue("/qgis/digitizing/marker_size", 3)


Martin


More information about the Qgis-developer mailing list