이 페이지에서

QTextInlineObject Class

QTextInlineObject 클래스는 QAbstractTextDocumentLayout 및 그 구현체 내의 인라인 객체를 나타냅니다. 더 보기...

헤더: #include <QTextInlineObject>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: QT += gui

참고: 이 클래스의 모든 함수는 재진입 가능합니다.

공개 함수

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

인라인 객체의 너비를 반환합니다.

setWidth(), ascent(), descent(), rect()도 참조하십시오 .

© 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.