PySide6.Qt3DExtras.Qt3DExtras.QText2DEntity¶
- class QText2DEntity¶
QText2DEntity
allows creation of a 2D text in 3D space. More…Synopsis¶
Properties¶
Methods¶
def
__init__()
def
alignment()
def
color()
def
font()
def
height()
def
setAlignment()
def
setColor()
def
setFont()
def
setHeight()
def
setText()
def
setWidth()
def
text()
def
width()
Signals¶
def
colorChanged()
def
fontChanged()
def
heightChanged()
def
textChanged()
def
widthChanged()
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.Note
Properties can be used directly when
from __feature__ import true_property
is used or via accessor functions otherwise.- property alignmentᅟ: Combination of Qt.AlignmentFlag¶
Returns the alignment of the text item that is displayed in the Qt Quick scene.
The default alignment is top-left-aligned.
- Access functions:
Holds the color for the text item that is displayed in the Qt Quick scene.
- Access functions:
Signal
colorChanged()
Holds the font for the text item that is displayed in the Qt Quick scene.
- Access functions:
Signal
fontChanged()
- property heightᅟ: float¶
Returns the height of the text item that is displayed in the Qt Quick scene.
- Access functions:
Signal
heightChanged()
- property textᅟ: str¶
Holds the text that is displayed in the Qt Quick scene.
- Access functions:
Signal
textChanged()
- property widthᅟ: float¶
Returns the width of the text item that is displayed in the Qt Quick scene.
- Access functions:
Signal
widthChanged()
- __init__([parent=None])¶
- Parameters:
parent –
QNode
- alignment()¶
- Return type:
Combination of
AlignmentFlag
See also
setAlignment()
Getter of property
alignmentᅟ
.Getter of property
colorᅟ
.Notification signal of property
colorᅟ
.Getter of property
fontᅟ
.Notification signal of property
fontᅟ
.- height()¶
- Return type:
float
See also
setHeight()
Getter of property
heightᅟ
.- heightChanged(height)¶
- Parameters:
height – float
Notification signal of property
heightᅟ
.- setAlignment(alignment)¶
- Parameters:
alignment – Combination of
AlignmentFlag
See also
alignment()
Setter of property
alignmentᅟ
.Setter of property
colorᅟ
.Setter of property
fontᅟ
.- setHeight(height)¶
- Parameters:
height – float
See also
height()
Setter of property
heightᅟ
.- setText(text)¶
- Parameters:
text – str
See also
text()
Setter of property
textᅟ
.- setWidth(width)¶
- Parameters:
width – float
See also
width()
Setter of property
widthᅟ
.- text()¶
- Return type:
str
See also
setText()
Getter of property
textᅟ
.- textChanged(text)¶
- Parameters:
text – str
Notification signal of property
textᅟ
.- width()¶
- Return type:
float
See also
setWidth()
Getter of property
widthᅟ
.- widthChanged(width)¶
- Parameters:
width – float
Notification signal of property
widthᅟ
.