QExtrudedTextGeometry Class

class Qt3DExtras::QExtrudedTextGeometry

The QExtrudedTextGeometry class allows creation of a 3D extruded text in 3D space. More...

Header: #include <Qt3DExtras/QExtrudedTextGeometry>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3dextras)
target_link_libraries(mytarget PRIVATE Qt6::3dextras)
qmake: QT += 3dextras
In QML: ExtrudedTextGeometry
Inherits: Qt3DCore::QGeometry
Status: Deprecated

Properties

Public Functions

QExtrudedTextGeometry(Qt3DCore::QNode *parent = nullptr)
float extrusionLength() const
QFont font() const
Qt3DCore::QAttribute *indexAttribute() const
Qt3DCore::QAttribute *normalAttribute() const
Qt3DCore::QAttribute *positionAttribute() const
QString text() const

Public Slots

void setDepth(float extrusionLength)
void setFont(const QFont &font)
void setText(const QString &text)

Signals

void depthChanged(float extrusionLength)
void fontChanged(const QFont &font)
void textChanged(const QString &text)

Detailed Description

The QExtrudedTextGeometry class is most commonly used internally by the QText3DMesh but can also be used in custom Qt3DRender::QGeometryRenderer subclasses.

The origin of the geometry is the rear left end of the text's baseline.

Property Documentation

extrusionLength : float

Holds the extrusion length of the text.

Access functions:

float extrusionLength() const
void setDepth(float extrusionLength)

Notifier signal:

void depthChanged(float extrusionLength)

font : QFont

Holds the font of the text.

The geometry is normalized by the font's pointSize, so a larger pointSize will result in smoother, rather than larger, text. pixelSize should not be used.

Access functions:

QFont font() const
void setFont(const QFont &font)

Notifier signal:

void fontChanged(const QFont &font)

[read-only] indexAttribute : Qt3DCore::QAttribute* const

Holds the geometry index attribute.

Access functions:

Qt3DCore::QAttribute *indexAttribute() const

[read-only] normalAttribute : Qt3DCore::QAttribute* const

Holds the geometry normal attribute.

Access functions:

Qt3DCore::QAttribute *normalAttribute() const

[read-only] positionAttribute : Qt3DCore::QAttribute* const

Holds the geometry position attribute.

Access functions:

Qt3DCore::QAttribute *positionAttribute() const

text : QString

Holds the text used for the mesh.

Access functions:

QString text() const
void setText(const QString &text)

Notifier signal:

void textChanged(const QString &text)

Member Function Documentation

[explicit] QExtrudedTextGeometry::QExtrudedTextGeometry(Qt3DCore::QNode *parent = nullptr)

Constructs a new QExtrudedTextGeometry with parent.

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.