Class: QgsDashSpaceWidget

A widget for entering a custom dash space pattern for lines.

Added in version 3.8.

QgsDashSpaceWidget showing a custom dash pattern

QgsDashSpaceWidget showing a custom dash pattern

Class Hierarchy

Inheritance diagram of qgis.gui.QgsDashSpaceWidget

Base classes

QgsPanelWidget

Base class for any widget that can be shown as an inline panel.

QWidget

QObject

QPaintDevice

Methods

dashDotVector

Returns the dash pattern as a list of numbers

setUnit

Sets the unit type used for the dash space pattern (used to update interface labels)

class qgis.gui.QgsDashSpaceWidget[source]

Bases: QgsPanelWidget

__init__(vectorPattern: Iterable[float], parent: QWidget | None = None)

Constructor for QgsDashSpaceWidget

Parameters:
  • vectorPattern (Iterable[float])

  • parent (Optional[QWidget] = None)

dashDotVector(self) List[float]

Returns the dash pattern as a list of numbers

Return type:

List[float]

setUnit(self, unit: Qgis.RenderUnit)[source]

Sets the unit type used for the dash space pattern (used to update interface labels)

Parameters:

unit (Qgis.RenderUnit) – the unit type