Qt3DExtras::QText2DEntity Class
class Qt3DExtras::QText2DEntityQText2DEntity를 사용하면 3D 공간에서 2D 텍스트를 생성할 수 있습니다. 더 보기...
| 헤더: | #include <Qt3DExtras/QText2DEntity> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS 3dextras) target_link_libraries(mytarget PRIVATE Qt6::3dextras) |
| qmake: | QT += 3dextras |
| QML에서: | Text2DEntity |
| 상속: | Qt3DCore::QEntity |
| 상태: | 사용 중단됨 |
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
속성
공개 함수
| Qt::Alignment | alignment() const |
| QColor | color() const |
| QFont | font() const |
| float | height() const |
| void | setAlignment(Qt::Alignment alignment) |
| void | setColor(const QColor &color) |
| void | setFont(const QFont &font) |
| void | setHeight(float height) |
| void | setText(const QString &text) |
| void | setWidth(float width) |
| QString | text() const |
| float | width() const |
신호
| void | colorChanged(const QColor &color) |
| void | fontChanged(const QFont &font) |
| void | heightChanged(float height) |
| void | textChanged(const QString &text) |
| void | widthChanged(float width) |
상세 설명
QText2DEntity는 텍스트를 XY 평면상의 삼각형으로 렌더링합니다. 지오메트리는 지정된 너비와 높이를 가진 직사각형 내에 맞춰집니다. 결과 지오메트리가 지정된 너비보다 넓을 경우, 나머지 부분은 새 줄에 렌더링됩니다.
트랜스폼 컴포넌트를 추가하여 씬 내에서 엔티티의 위치를 지정할 수 있습니다.
QText2DEntity는 글리프의 모양을 기반으로 기하 구조를 생성하고, 지정된 색상을 사용하여 솔리드 재질을 만듭니다.
속성 설명
alignment : Qt::Alignment
Qt Quick 씬에 표시되는 텍스트 항목의 정렬 방식을 반환합니다.
기본 정렬 방식은 왼쪽 상단 정렬입니다.
액세스 함수:
| Qt::Alignment | alignment() const |
| void | setAlignment(Qt::Alignment alignment) |
color : QColor
Qt Quick 씬에 표시되는 텍스트 항목의 색상을 지정합니다.
액세스 함수:
| QColor | color() const |
| void | setColor(const QColor &color) |
알림 신호:
| void | colorChanged(const QColor &color) |
font : QFont
Qt Quick 씬에 표시되는 텍스트 항목의 글꼴을 저장합니다.
액세스 함수:
| QFont | font() const |
| void | setFont(const QFont &font) |
알림 신호:
| void | fontChanged(const QFont &font) |
height : float
Qt Quick 씬에 표시된 텍스트 항목의 높이를 반환합니다.
액세스 함수:
| float | height() const |
| void | setHeight(float height) |
알림 신호:
| void | heightChanged(float height) |
text : QString
Qt Quick 장면에서 표시되는 텍스트를 저장합니다.
액세스 함수:
| QString | text() const |
| void | setText(const QString &text) |
알림 신호:
| void | textChanged(const QString &text) |
width : float
Qt Quick 씬에 표시된 텍스트 항목의 너비를 반환합니다.
액세스 함수:
| float | width() const |
| void | setWidth(float width) |
알림 신호:
| void | widthChanged(float width) |
© 2026 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.