QTextInlineObject Class
QTextInlineObject 클래스는 QAbstractTextDocumentLayout 및 그 구현의 인라인 객체를 나타냅니다. 더 보기...
헤더: | #include <QTextInlineObject> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui) target_link_libraries(mytarget PRIVATE Qt6::Gui) |
qmake: | QT += gui |
- 상속된 멤버를 포함한 모든 멤버 목록
- QTextInlineObject는 리치 텍스트 처리 API의 일부입니다.
참고: 이 클래스의 모든 함수는 재진입합니다.
공용 함수
qreal | ascent() const |
qreal | descent() const |
QTextFormat | format() const |
int | formatIndex() const |
qreal | height() const |
bool | isValid() const |
QRectF | rect() const |
void | setAscent(qreal a) |
void | setDescent(qreal d) |
void | setWidth(qreal w) |
Qt::LayoutDirection | textDirection() const |
int | textPosition() const |
qreal | width() const |
상세 설명
일반적으로 QTextInlineObject를 만들 필요가 없습니다. 이 함수는 QAbstractTextDocumentLayout 에서 사용자 정의 레이아웃을 구현할 때 인라인 객체를 처리하는 데 사용됩니다.
인라인 객체에는 setWidth(), setAscent(), setDescent() 등을 사용하여 설정할 수 있는 다양한 속성이 있습니다. 인라인 객체가 차지하는 사각형은 rect(), 방향은 textDirection()로 지정할 수 있습니다. 텍스트 레이아웃에서의 위치는 textPosition(), 형식은 format()로 지정할 수 있습니다.
멤버 함수 문서
qreal QTextInlineObject::ascent() const
인라인 객체의 상승을 반환합니다.
setAscent(), descent(), width() 및 rect()도 참조하세요 .
qreal QTextInlineObject::descent() const
인라인 객체의 하강을 반환합니다.
setDescent(), ascent(), width() 및 rect()도 참조하세요 .
QTextFormat QTextInlineObject::format() const
텍스트 레이아웃 내 인라인 객체의 형식을 반환합니다.
int QTextInlineObject::formatIndex() const
텍스트 레이아웃 내 인라인 객체의 형식을 설명하는 정수를 반환합니다.
qreal QTextInlineObject::height() const
인라인 객체의 전체 높이를 반환합니다. 이는 ascent() + descent() + 1과 같습니다.
ascent(), descent(), width() 및 rect()도 참조하세요 .
bool QTextInlineObject::isValid() const
이 인라인 객체가 유효하면 true
을 반환하고, 그렇지 않으면 false를 반환합니다.
QRectF QTextInlineObject::rect() const
인라인 객체의 직사각형을 반환합니다.
ascent(), descent() 및 width()도 참조하세요 .
void QTextInlineObject::setAscent(qreal a)
인라인 객체의 상승을 a 로 설정합니다.
ascent(), setDescent(), width() 및 rect()도 참조하세요 .
void QTextInlineObject::setDescent(qreal d)
인라인 객체의 하강을 d 로 설정합니다.
descent(), setAscent(), width() 및 rect()도 참조하세요 .
void QTextInlineObject::setWidth(qreal w)
인라인 객체의 너비를 w 로 설정합니다.
width(), ascent(), descent() 및 rect()도 참조하세요 .
Qt::LayoutDirection QTextInlineObject::textDirection() const
객체를 오른쪽에서 왼쪽으로 또는 왼쪽에서 오른쪽으로 배치해야 하는지 반환합니다.
int QTextInlineObject::textPosition() const
텍스트 레이아웃 내 인라인 객체의 위치입니다.
qreal QTextInlineObject::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.