QLegendMarker#
The QLegendMarker class is an abstract object that can be used to access markers within a legend. More…
Inherited by: QXYLegendMarker, QPieLegendMarker, QCandlestickLegendMarker, QBoxPlotLegendMarker, QBarLegendMarker, QAreaLegendMarker
Synopsis#
Properties#
Functions#
def
brush()def
font()def
isVisible()def
label()def
labelBrush()def
pen()def
setBrush(brush)def
setFont(font)def
setLabel(label)def
setLabelBrush(brush)def
setPen(pen)def
setShape(shape)def
setVisible(visible)def
shape()
Virtual functions#
Signals#
def
brushChanged()def
clicked()def
fontChanged()def
hovered(status)def
labelBrushChanged()def
labelChanged()def
penChanged()def
shapeChanged()def
visibleChanged()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description#
A legend marker consists of an icon and a label. The icon color corresponds to the color used to draw a series and the label displays the name of the series (or the label of the slice for a pie series or bar set for a bar series). A legend marker is always related to one series, slice, or bar set.
![]()
See also
- class PySide6.QtCharts.QLegendMarker#
Note
Properties can be used directly when from __feature__ import true_property is used or via accessor functions otherwise.
- property PᅟySide6.QtCharts.QLegendMarker.brush: PySide6.QtGui.QBrush#
This property holds The brush used to fill the icon..
- Access functions:
brush()setBrush(brush)Signal
brushChanged()
- property PᅟySide6.QtCharts.QLegendMarker.font: PySide6.QtGui.QFont#
This property holds The font of the label..
- Access functions:
font()setFont(font)Signal
fontChanged()
- property PᅟySide6.QtCharts.QLegendMarker.label: str#
This property holds The text shown in the legend for a legend marker..
- Access functions:
label()setLabel(label)Signal
labelChanged()
- property PᅟySide6.QtCharts.QLegendMarker.labelBrush: PySide6.QtGui.QBrush#
This property holds The brush of the label..
- Access functions:
labelBrush()setLabelBrush(brush)Signal
labelBrushChanged()
- property PᅟySide6.QtCharts.QLegendMarker.pen: PySide6.QtGui.QPen#
This property holds The pen used to draw the outline of the icon..
- Access functions:
pen()setPen(pen)Signal
penChanged()
- property PᅟySide6.QtCharts.QLegendMarker.shape: MarkerShape#
The shape of the legend marker. Defaults to MarkerShapeDefault , which indicates the shape is determined by markerShape property.
- Access functions:
shape()setShape(shape)Signal
shapeChanged()
- property PᅟySide6.QtCharts.QLegendMarker.visible: bool#
This property holds The visibility of the legend marker..
The visibility affects both the legend marker label and the icon.
- Access functions:
isVisible()setVisible(visible)Signal
visibleChanged()
- PySide6.QtCharts.QLegendMarker.LegendMarkerType#
The type of the legend marker object.
Constant
Description
QLegendMarker.LegendMarkerTypeArea
A legend marker for an area series.
QLegendMarker.LegendMarkerTypeBar
A legend marker for a bar set.
QLegendMarker.LegendMarkerTypePie
A legend marker for a pie slice.
QLegendMarker.LegendMarkerTypeXY
A legend marker for a line, spline, or scatter series.
QLegendMarker.LegendMarkerTypeBoxPlot
A legend marker for a box plot series.
QLegendMarker.LegendMarkerTypeCandlestick
A legend marker for a candlestick series.
- PySide6.QtCharts.QLegendMarker.brush()#
- Return type:
Returns the brush used to fill the icon.
See also
Getter of property brush .
- PySide6.QtCharts.QLegendMarker.brushChanged()#
This signal is emitted when the brush of the legend marker has changed.
Notification signal of property brush .
- PySide6.QtCharts.QLegendMarker.clicked()#
This signal is emitted when the legend marker is clicked.
- PySide6.QtCharts.QLegendMarker.font()#
- Return type:
Retuns the font of the label.
See also
Getter of property font .
- PySide6.QtCharts.QLegendMarker.fontChanged()#
This signal is emitted when the (label) font of the legend marker has changed.
Notification signal of property font .
- PySide6.QtCharts.QLegendMarker.hovered(status)#
- Parameters:
status – bool
This signal is emitted when a mouse is hovered over the legend marker. When the mouse moves over the marker, status turns true, and when the mouse moves away again, it turns false.
- PySide6.QtCharts.QLegendMarker.isVisible()#
- Return type:
bool
Returns the visibility of the marker.
Getter of property visible .
- PySide6.QtCharts.QLegendMarker.label()#
- Return type:
str
Returns the label of the marker.
See also
Getter of property label .
- PySide6.QtCharts.QLegendMarker.labelBrush()#
- Return type:
Returns the brush that is used to draw the label.
See also
Getter of property labelBrush .
- PySide6.QtCharts.QLegendMarker.labelBrushChanged()#
This signal is emitted when the label brush of the legend marker has changed.
Notification signal of property labelBrush .
- PySide6.QtCharts.QLegendMarker.labelChanged()#
This signal is emitted when the label of the legend marker has changed.
Notification signal of property label .
- PySide6.QtCharts.QLegendMarker.pen()#
- Return type:
Returns the pen used to draw the outline of the icon.
See also
Getter of property pen .
- PySide6.QtCharts.QLegendMarker.penChanged()#
This signal is emitted when the pen of the legend marker has changed.
Notification signal of property pen .
- abstract PySide6.QtCharts.QLegendMarker.series()#
- Return type:
Returns a pointer to the series that is related to this legend marker. A legend marker is always related to a series.
- PySide6.QtCharts.QLegendMarker.setBrush(brush)#
- Parameters:
brush –
PySide6.QtGui.QBrush
Sets the brush used to fill the icon to brush.
Setter of property brush .
- PySide6.QtCharts.QLegendMarker.setFont(font)#
- Parameters:
font –
PySide6.QtGui.QFont
Sets the font of the label to font.
See also
Setter of property font .
- PySide6.QtCharts.QLegendMarker.setLabel(label)#
- Parameters:
label – str
Sets the label of the marker to label.
Setter of property label .
- PySide6.QtCharts.QLegendMarker.setLabelBrush(brush)#
- Parameters:
brush –
PySide6.QtGui.QBrush
Sets the the brush used to draw to label to brush.
See also
Setter of property labelBrush .
- PySide6.QtCharts.QLegendMarker.setPen(pen)#
- Parameters:
pen –
PySide6.QtGui.QPen
Sets the pen used to draw the outline of the icon to pen.
See also
Setter of property pen .
- PySide6.QtCharts.QLegendMarker.setShape(shape)#
- Parameters:
shape –
MarkerShape
See also
Setter of property shape .
- PySide6.QtCharts.QLegendMarker.setVisible(visible)#
- Parameters:
visible – bool
Sets the marker’s visibility to visible.
See also
Setter of property visible .
- PySide6.QtCharts.QLegendMarker.shape()#
- Return type:
See also
Getter of property shape .
- PySide6.QtCharts.QLegendMarker.shapeChanged()#
Notification signal of property shape .
- abstract PySide6.QtCharts.QLegendMarker.type()#
- Return type:
Returns the type of the legend marker for the related series, pie slice, or bar set.
See also
LegendMarkerType
- PySide6.QtCharts.QLegendMarker.visibleChanged()#
This signal is emitted when the visibility of the legend marker has changed.
Notification signal of property visible .