QText2DEntity#
QText2DEntity
allows creation of a 2D text in 3D space. More…
Synopsis#
Properties#
Functions#
Signals#
def
colorChanged
(color)def
fontChanged
(font)def
heightChanged
(height)def
textChanged
(text)def
widthChanged
(width)
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 QText2DEntity
renders text as triangles in the XY plane. The geometry will be fitted in the rectangle of specified width and height. If the resulting geometry is wider than the specified width, the remainder will be rendered on the new line.
The entity can be positionned in the scene by adding a transform component.
QText2DEntity
will create geometry based on the shape of the glyphs and a solid material using the specified color.
- class PySide6.Qt3DExtras.Qt3DExtras.QText2DEntity([parent=None])#
- Parameters:
parent –
PySide6.Qt3DCore.Qt3DCore.QNode
Note
Properties can be used directly when from __feature__ import true_property
is used or via accessor functions otherwise.
- property PᅟySide6.Qt3DExtras.Qt3DExtras.QText2DEntity.color: PySide6.QtGui.QColor#
Holds the color for the text item that is displayed in the Qt Quick scene.
- Access functions:
color
()setColor
(color)Signal
colorChanged
(color)
- property PᅟySide6.Qt3DExtras.Qt3DExtras.QText2DEntity.font: PySide6.QtGui.QFont#
Holds the font for the text item that is displayed in the Qt Quick scene.
- Access functions:
font
()setFont
(font)Signal
fontChanged
(font)
- property PᅟySide6.Qt3DExtras.Qt3DExtras.QText2DEntity.height: float#
Returns the height of the text item that is displayed in the Qt Quick scene.
- Access functions:
height
()setHeight
(height)Signal
heightChanged
(height)
- property PᅟySide6.Qt3DExtras.Qt3DExtras.QText2DEntity.text: str#
Holds the text that is displayed in the Qt Quick scene.
- Access functions:
text
()setText
(text)Signal
textChanged
(text)
- property PᅟySide6.Qt3DExtras.Qt3DExtras.QText2DEntity.width: float#
Returns the width of the text item that is displayed in the Qt Quick scene.
- Access functions:
width
()setWidth
(width)Signal
widthChanged
(width)
- PySide6.Qt3DExtras.Qt3DExtras.QText2DEntity.color()#
- Return type:
See also
Getter of property color
.
- PySide6.Qt3DExtras.Qt3DExtras.QText2DEntity.colorChanged(color)#
- Parameters:
color –
PySide6.QtGui.QColor
Notification signal of property color
.
- PySide6.Qt3DExtras.Qt3DExtras.QText2DEntity.font()#
- Return type:
See also
Getter of property font
.
- PySide6.Qt3DExtras.Qt3DExtras.QText2DEntity.fontChanged(font)#
- Parameters:
font –
PySide6.QtGui.QFont
Notification signal of property font
.
- PySide6.Qt3DExtras.Qt3DExtras.QText2DEntity.height()#
- Return type:
float
See also
Getter of property height
.
- PySide6.Qt3DExtras.Qt3DExtras.QText2DEntity.heightChanged(height)#
- Parameters:
height – float
Notification signal of property height
.
- PySide6.Qt3DExtras.Qt3DExtras.QText2DEntity.setColor(color)#
- Parameters:
color –
PySide6.QtGui.QColor
See also
Setter of property color
.
- PySide6.Qt3DExtras.Qt3DExtras.QText2DEntity.setFont(font)#
- Parameters:
font –
PySide6.QtGui.QFont
See also
Setter of property font
.
- PySide6.Qt3DExtras.Qt3DExtras.QText2DEntity.setHeight(height)#
- Parameters:
height – float
See also
Setter of property height
.
Setter of property text
.
- PySide6.Qt3DExtras.Qt3DExtras.QText2DEntity.setWidth(width)#
- Parameters:
width – float
See also
Setter of property width
.
Getter of property text
.
- PySide6.Qt3DExtras.Qt3DExtras.QText2DEntity.textChanged(text)#
- Parameters:
text – str
Notification signal of property text
.
- PySide6.Qt3DExtras.Qt3DExtras.QText2DEntity.width()#
- Return type:
float
See also
Getter of property width
.
- PySide6.Qt3DExtras.Qt3DExtras.QText2DEntity.widthChanged(width)#
- Parameters:
width – float
Notification signal of property width
.