QCustom3DLabel

The QCustom3DLabel class adds a custom label to a graph. More

Inheritance diagram of PySide6.QtDataVisualization.QCustom3DLabel

Synopsis

Functions

Signals

Detailed Description

The text, font, position, scaling, rotation, and colors of a custom label can be set. In addition, the visibility of the borders and background of the label can be toggled. Colors, borders, and background are determined by the active theme unless set explicitly.

Note

In scaling, the z-coordinate has no effect. Setting the same x- and y-coordinates retains the original font dimensions.

See also

addCustomItem()

class PySide6.QtDataVisualization.QCustom3DLabel([parent=None])

PySide6.QtDataVisualization.QCustom3DLabel(text, font, position, scaling, rotation[, parent=None])

Parameters

Constructs a custom 3D label with the given parent.

Constructs a custom 3D label with the given text, font, position, scaling, rotation, and optional parent.

Note

Setting the same x- and y-coordinates for scaling retains the original font dimensions.

PySide6.QtDataVisualization.QCustom3DLabel.backgroundColor()
Return type

PySide6.QtGui.QColor

This property holds The color for the label background, if enabled..

Defaults to Qt::gray.

See also

backgroundEnabled

PySide6.QtDataVisualization.QCustom3DLabel.backgroundColorChanged(color)
Parameters

colorPySide6.QtGui.QColor

PySide6.QtDataVisualization.QCustom3DLabel.backgroundEnabledChanged(enabled)
Parameters

enabled – bool

PySide6.QtDataVisualization.QCustom3DLabel.borderEnabledChanged(enabled)
Parameters

enabled – bool

PySide6.QtDataVisualization.QCustom3DLabel.facingCameraChanged(enabled)
Parameters

enabled – bool

PySide6.QtDataVisualization.QCustom3DLabel.font()
Return type

PySide6.QtGui.QFont

This property holds The font to be used for the label..

Defaults to QFont("Arial", 20). Special formatting (for example, outlined) is not supported.

PySide6.QtDataVisualization.QCustom3DLabel.fontChanged(font)
Parameters

fontPySide6.QtGui.QFont

PySide6.QtDataVisualization.QCustom3DLabel.isBackgroundEnabled()
Return type

bool

This property holds Whether the label background is enabled..

If set to false, backgroundColor() has no effect. Defaults to true.

PySide6.QtDataVisualization.QCustom3DLabel.isBorderEnabled()
Return type

bool

This property holds Whether label borders are enabled..

Defaults to true.

PySide6.QtDataVisualization.QCustom3DLabel.isFacingCamera()
Return type

bool

This property holds Whether the label will always face the camera..

Defaults to false. If set to true, rotation() has no effect.

PySide6.QtDataVisualization.QCustom3DLabel.setBackgroundColor(color)
Parameters

colorPySide6.QtGui.QColor

This property holds The color for the label background, if enabled..

Defaults to Qt::gray.

See also

backgroundEnabled

PySide6.QtDataVisualization.QCustom3DLabel.setBackgroundEnabled(enabled)
Parameters

enabled – bool

This property holds Whether the label background is enabled..

If set to false, backgroundColor() has no effect. Defaults to true.

PySide6.QtDataVisualization.QCustom3DLabel.setBorderEnabled(enabled)
Parameters

enabled – bool

This property holds Whether label borders are enabled..

Defaults to true.

PySide6.QtDataVisualization.QCustom3DLabel.setFacingCamera(enabled)
Parameters

enabled – bool

This property holds Whether the label will always face the camera..

Defaults to false. If set to true, rotation() has no effect.

PySide6.QtDataVisualization.QCustom3DLabel.setFont(font)
Parameters

fontPySide6.QtGui.QFont

This property holds The font to be used for the label..

Defaults to QFont("Arial", 20). Special formatting (for example, outlined) is not supported.

PySide6.QtDataVisualization.QCustom3DLabel.setText(text)
Parameters

text – str

This property holds The text for the label..

Rich text is not supported.

PySide6.QtDataVisualization.QCustom3DLabel.setTextColor(color)
Parameters

colorPySide6.QtGui.QColor

This property holds The color for the label text..

Also affects the label border, if enabled. Defaults to Qt::white.

See also

borderEnabled

PySide6.QtDataVisualization.QCustom3DLabel.text()
Return type

str

This property holds The text for the label..

Rich text is not supported.

PySide6.QtDataVisualization.QCustom3DLabel.textChanged(text)
Parameters

text – str

PySide6.QtDataVisualization.QCustom3DLabel.textColor()
Return type

PySide6.QtGui.QColor

This property holds The color for the label text..

Also affects the label border, if enabled. Defaults to Qt::white.

See also

borderEnabled

PySide6.QtDataVisualization.QCustom3DLabel.textColorChanged(color)
Parameters

colorPySide6.QtGui.QColor