QCustom3DLabel#
The QCustom3DLabel
class adds a custom label to a graph. More…
Synopsis#
Properties#
backgroundColor
- Color for the label background, if enabledbackgroundEnabled
- Whether the label background is enabledborderEnabled
- Whether label borders are enabledfacingCamera
- Whether the label will always face the camerafont
- To be used for the labeltext
- For the labeltextColor
- Color for the label text
Functions#
def
backgroundColor
()def
font
()def
isBackgroundEnabled
()def
isBorderEnabled
()def
isFacingCamera
()def
setBackgroundColor
(color)def
setBackgroundEnabled
(enabled)def
setBorderEnabled
(enabled)def
setFacingCamera
(enabled)def
setFont
(font)def
setText
(text)def
setTextColor
(color)def
text
()def
textColor
()
Signals#
def
backgroundColorChanged
(color)def
backgroundEnabledChanged
(enabled)def
borderEnabledChanged
(enabled)def
facingCameraChanged
(enabled)def
fontChanged
(font)def
textChanged
(text)def
textColorChanged
(color)
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#
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
- class PySide6.QtDataVisualization.QCustom3DLabel([parent=None])#
PySide6.QtDataVisualization.QCustom3DLabel(text, font, position, scaling, rotation[, parent=None])
- Parameters:
position –
PySide6.QtGui.QVector3D
font –
PySide6.QtGui.QFont
scaling –
PySide6.QtGui.QVector3D
rotation –
PySide6.QtGui.QQuaternion
text – str
parent –
PySide6.QtCore.QObject
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.
Note
Properties can be used directly when from __feature__ import true_property
is used or via accessor functions otherwise.
- property PᅟySide6.QtDataVisualization.QCustom3DLabel.backgroundColor: PySide6.QtGui.QColor#
This property holds The color for the label background, if enabled..
Defaults to Qt::gray
.
See also
backgroundEnabled
- Access functions:
setBackgroundColor
(color)Signal
backgroundColorChanged
(color)
- property PᅟySide6.QtDataVisualization.QCustom3DLabel.backgroundEnabled: bool#
This property holds Whether the label background is enabled..
If set to false
, backgroundColor()
has no effect. Defaults to true
.
- Access functions:
setBackgroundEnabled
(enabled)Signal
backgroundEnabledChanged
(enabled)
- property PᅟySide6.QtDataVisualization.QCustom3DLabel.borderEnabled: bool#
This property holds Whether label borders are enabled..
Defaults to true
.
- Access functions:
setBorderEnabled
(enabled)Signal
borderEnabledChanged
(enabled)
- property PᅟySide6.QtDataVisualization.QCustom3DLabel.facingCamera: bool#
This property holds Whether the label will always face the camera..
Defaults to false
. If set to true
, rotation()
has no effect.
- Access functions:
setFacingCamera
(enabled)Signal
facingCameraChanged
(enabled)
- property PᅟySide6.QtDataVisualization.QCustom3DLabel.font: 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.
- Access functions:
font
()setFont
(font)Signal
fontChanged
(font)
- property PᅟySide6.QtDataVisualization.QCustom3DLabel.text: str#
This property holds The text for the label..
Rich text is not supported.
- Access functions:
text
()setText
(text)Signal
textChanged
(text)
- property PᅟySide6.QtDataVisualization.QCustom3DLabel.textColor: 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
- Access functions:
textColor
()setTextColor
(color)Signal
textColorChanged
(color)
- PySide6.QtDataVisualization.QCustom3DLabel.backgroundColor()#
- Return type:
See also
Getter of property backgroundColor
.
- PySide6.QtDataVisualization.QCustom3DLabel.backgroundColorChanged(color)#
- Parameters:
color –
PySide6.QtGui.QColor
Notification signal of property backgroundColor
.
- PySide6.QtDataVisualization.QCustom3DLabel.backgroundEnabledChanged(enabled)#
- Parameters:
enabled – bool
Notification signal of property backgroundEnabled
.
- PySide6.QtDataVisualization.QCustom3DLabel.borderEnabledChanged(enabled)#
- Parameters:
enabled – bool
Notification signal of property borderEnabled
.
- PySide6.QtDataVisualization.QCustom3DLabel.facingCameraChanged(enabled)#
- Parameters:
enabled – bool
Notification signal of property facingCamera
.
- PySide6.QtDataVisualization.QCustom3DLabel.font()#
- Return type:
See also
Getter of property font
.
- PySide6.QtDataVisualization.QCustom3DLabel.fontChanged(font)#
- Parameters:
font –
PySide6.QtGui.QFont
Notification signal of property font
.
- PySide6.QtDataVisualization.QCustom3DLabel.isBackgroundEnabled()#
- Return type:
bool
Getter of property backgroundEnabled
.
- PySide6.QtDataVisualization.QCustom3DLabel.isBorderEnabled()#
- Return type:
bool
Getter of property borderEnabled
.
- PySide6.QtDataVisualization.QCustom3DLabel.isFacingCamera()#
- Return type:
bool
Getter of property facingCamera
.
- PySide6.QtDataVisualization.QCustom3DLabel.setBackgroundColor(color)#
- Parameters:
color –
PySide6.QtGui.QColor
See also
Setter of property backgroundColor
.
- PySide6.QtDataVisualization.QCustom3DLabel.setBackgroundEnabled(enabled)#
- Parameters:
enabled – bool
See also
Setter of property backgroundEnabled
.
- PySide6.QtDataVisualization.QCustom3DLabel.setBorderEnabled(enabled)#
- Parameters:
enabled – bool
See also
Setter of property borderEnabled
.
- PySide6.QtDataVisualization.QCustom3DLabel.setFacingCamera(enabled)#
- Parameters:
enabled – bool
See also
Setter of property facingCamera
.
- PySide6.QtDataVisualization.QCustom3DLabel.setFont(font)#
- Parameters:
font –
PySide6.QtGui.QFont
See also
Setter of property font
.
Setter of property text
.
- PySide6.QtDataVisualization.QCustom3DLabel.setTextColor(color)#
- Parameters:
color –
PySide6.QtGui.QColor
See also
Setter of property textColor
.
Getter of property text
.
- PySide6.QtDataVisualization.QCustom3DLabel.textChanged(text)#
- Parameters:
text – str
Notification signal of property text
.
- PySide6.QtDataVisualization.QCustom3DLabel.textColor()#
- Return type:
See also
Getter of property textColor
.
- PySide6.QtDataVisualization.QCustom3DLabel.textColorChanged(color)#
- Parameters:
color –
PySide6.QtGui.QColor
Notification signal of property textColor
.