QTextItem Class
QTextItem 클래스는 사용자 지정 페인트 엔진에서 텍스트를 그리는 데 필요한 모든 정보를 제공합니다. 더 보기...
Header: | #include <QTextItem> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui) target_link_libraries(mytarget PRIVATE Qt6::Gui) |
qmake: | QT += gui |
공용 타입
enum | RenderFlag { RightToLeft, Overline, Underline, StrikeOut } |
flags | RenderFlags |
공용 함수
qreal | ascent() const |
qreal | descent() const |
QFont | font() const |
QTextItem::RenderFlags | renderFlags() const |
QString | text() const |
qreal | width() const |
상세 설명
자체 페인트 엔진을 다시 구현할 때는 QTextItem을 인수로 받는 함수인 QPaintEngine::drawTextItem()를 다시 구현해야 합니다.
멤버 유형 문서
열거형 QTextItem::RenderFlag
플래그 QTextItem::RenderFlags
Constant | 값 | 설명 |
---|---|---|
QTextItem::RightToLeft | 0x1 | 텍스트를 오른쪽에서 왼쪽으로 렌더링합니다. |
QTextItem::Overline | 0x10 | 텍스트 위에 선을 그립니다. |
QTextItem::Underline | 0x20 | 텍스트 아래에 선을 그립니다. |
QTextItem::StrikeOut | 0x40 | 텍스트를 통과하는 선을 그립니다. |
RenderFlags 유형은 QFlags<RenderFlag>에 대한 typedef입니다. RenderFlag 값의 OR 조합을 저장합니다.
멤버 함수 문서
qreal QTextItem::ascent() const
그려지는 텍스트의 ascent 에 해당합니다.
qreal QTextItem::descent() const
그려지는 텍스트의 descent 에 해당합니다.
QFont QTextItem::font() const
텍스트를 그리는 데 사용할 글꼴을 반환합니다.
QTextItem::RenderFlags QTextItem::renderFlags() const
사용된 렌더링 플래그를 반환합니다.
QString QTextItem::text() const
그려야 할 텍스트를 반환합니다.
qreal QTextItem::width() const
그려질 텍스트의 전체 너비를 지정합니다.
© 2025 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.