Class: QgsVertexMarker

A map canvas item for marking vertices of features using e.g. circles or ‘x’.

Class Hierarchy

Inheritance diagram of qgis.gui.QgsVertexMarker

Base classes

QgsMapCanvasItem

An abstract class for items that can be placed on the map canvas.

QGraphicsItem

class qgis.gui.QgsVertexMarker[source]

Bases: QgsMapCanvasItem

ICON_BOX = 3
ICON_CIRCLE = 4
ICON_CROSS = 1
ICON_DOUBLE_TRIANGLE = 5
ICON_INVERTED_TRIANGLE = 8
ICON_NONE = 0
ICON_RHOMBUS = 7
ICON_TRIANGLE = 6
ICON_X = 2
class IconType

Bases: int

center(self) QgsPointXY[source]

Returns the center point of the marker, in map coordinates.

See also

setCenter()

Added in version 3.18.

Return type:

QgsPointXY

color(self) QColor[source]

Returns the stroke color for the marker.

See also

setColor()

See also

fillColor()

Return type:

QColor

fillColor(self) QColor[source]

Returns the fill color for the marker. This setting only applies to some icon types.

See also

setFillColor()

See also

color()

Return type:

QColor

setCenter(self, point: QgsPointXY)[source]

Sets the center point of the marker, in map coordinates.

See also

center()

Parameters:

point (QgsPointXY)

setColor(self, color: QColor | Qt.GlobalColor)[source]

Sets the stroke color for the marker.

See also

color()

See also

setFillColor()

Parameters:

color (Union[QColor, Qt.GlobalColor])

setFillColor(self, color: QColor | Qt.GlobalColor)[source]

Sets the fill color for the marker. This setting only applies to some icon types.

See also

fillColor()

See also

setColor()

Parameters:

color (Union[QColor, Qt.GlobalColor])

setIconSize(self, iconSize: int)[source]
Parameters:

iconSize (int)

setIconType(self, iconType: int)[source]
Parameters:

iconType (int)

setPenWidth(self, width: int)[source]
Parameters:

width (int)