QText2DEntity

QText2DEntity allows creation of a 2D text in 3D space. More

Inheritance diagram of PySide6.Qt3DExtras.Qt3DExtras.QText2DEntity

Synopsis

Functions

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

parentPySide6.Qt3DCore.Qt3DCore.QNode

PySide6.Qt3DExtras.Qt3DExtras.QText2DEntity.color()
Return type

PySide6.QtGui.QColor

See also

setColor()

PySide6.Qt3DExtras.Qt3DExtras.QText2DEntity.colorChanged(color)
Parameters

colorPySide6.QtGui.QColor

PySide6.Qt3DExtras.Qt3DExtras.QText2DEntity.font()
Return type

PySide6.QtGui.QFont

See also

setFont()

PySide6.Qt3DExtras.Qt3DExtras.QText2DEntity.fontChanged(font)
Parameters

fontPySide6.QtGui.QFont

PySide6.Qt3DExtras.Qt3DExtras.QText2DEntity.height()
Return type

float

See also

setHeight()

PySide6.Qt3DExtras.Qt3DExtras.QText2DEntity.heightChanged(height)
Parameters

height – float

PySide6.Qt3DExtras.Qt3DExtras.QText2DEntity.setColor(color)
Parameters

colorPySide6.QtGui.QColor

See also

color()

PySide6.Qt3DExtras.Qt3DExtras.QText2DEntity.setFont(font)
Parameters

fontPySide6.QtGui.QFont

See also

font()

PySide6.Qt3DExtras.Qt3DExtras.QText2DEntity.setHeight(height)
Parameters

height – float

See also

height()

PySide6.Qt3DExtras.Qt3DExtras.QText2DEntity.setText(text)
Parameters

text – str

See also

text()

PySide6.Qt3DExtras.Qt3DExtras.QText2DEntity.setWidth(width)
Parameters

width – float

See also

width()

PySide6.Qt3DExtras.Qt3DExtras.QText2DEntity.text()
Return type

str

See also

setText()

PySide6.Qt3DExtras.Qt3DExtras.QText2DEntity.textChanged(text)
Parameters

text – str

PySide6.Qt3DExtras.Qt3DExtras.QText2DEntity.width()
Return type

float

See also

setWidth()

PySide6.Qt3DExtras.Qt3DExtras.QText2DEntity.widthChanged(width)
Parameters

width – float