[Qgis-developer] Re: [PyQGIS] - Change VertexMarkerType

Salvatore Larosa s_larosa at libero.it
Tue Feb 22 04:50:26 EST 2011



Martin Dobias wrote:
> 
> 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
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
> 
> 

Thank for your reply, Martin

I put in the my script the code you posted, but it not works.

I have imported QSettings() from PyQt4.QtCore and put the code
in class MainWindow and I get this error:

File "/home/sam/dev_qgis/src/mainwintest.py", line 32, in __init__
settings.setValue("/qgis/digitizing/marker_style", "SemiTransparentCircle")
TypeError: argument 2 of QSettings.setValue() has an invalid type

Any hint?

Thnks!

Salvatore
-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/PyQGIS-Change-VertexMarkerType-tp6050479p6051731.html
Sent from the qgis-developer mailing list archive at Nabble.com.


More information about the Qgis-developer mailing list