Movatterモバイル変換


[0]ホーム

URL:


We bake cookies in your browser for a better experience. Using this site means that you consent.Read More

Menu

Qt Documentation

QTextInlineObject Class

TheQTextInlineObject class represents an inline object in aQTextLayout.More...

Header:#include <QTextInlineObject>

Note: All functions in this class arereentrant.

Public Functions

QTextInlineObject(int i, QTextEngine * e)
qrealascent() const
qrealdescent() const
QTextFormatformat() const
intformatIndex() const
qrealheight() const
boolisValid() const
QRectFrect() const
voidsetAscent(qreal a)
voidsetDescent(qreal d)
voidsetWidth(qreal w)
Qt::LayoutDirectiontextDirection() const
inttextPosition() const
qrealwidth() const

Detailed Description

TheQTextInlineObject class represents an inline object in aQTextLayout.

This class is only used if the text layout is used to lay out parts of aQTextDocument.

The inline object has various attributes that can be set, for example using,setWidth(),setAscent(), andsetDescent(). The rectangle it occupies is given byrect(), and its direction by isRightToLeft(). Its position in the text layout is given by at(), and its format is given byformat().

Member Function Documentation

QTextInlineObject::QTextInlineObject(int i,QTextEngine * e)

Creates a new inline object for the item at positioni in the text enginee.

qreal QTextInlineObject::ascent() const

Returns the inline object's ascent.

See alsosetAscent(),descent(),width(), andrect().

qreal QTextInlineObject::descent() const

Returns the inline object's descent.

See alsosetDescent(),ascent(),width(), andrect().

QTextFormat QTextInlineObject::format() const

Returns format of the inline object within the text layout.

int QTextInlineObject::formatIndex() const

Returns an integer describing the format of the inline object within the text layout.

qreal QTextInlineObject::height() const

Returns the inline object's total height. This is equal toascent() +descent() + 1.

See alsoascent(),descent(),width(), andrect().

bool QTextInlineObject::isValid() const

Returns true if this inline object is valid; otherwise returns false.

QRectF QTextInlineObject::rect() const

Returns the inline object's rectangle.

See alsoascent(),descent(), andwidth().

void QTextInlineObject::setAscent(qreal a)

Sets the inline object's ascent toa.

See alsoascent(),setDescent(),width(), andrect().

void QTextInlineObject::setDescent(qreal d)

Sets the inline object's decent tod.

See alsodescent(),setAscent(),width(), andrect().

void QTextInlineObject::setWidth(qreal w)

Sets the inline object's width tow.

See alsowidth(),ascent(),descent(), andrect().

Qt::LayoutDirection QTextInlineObject::textDirection() const

Returns if the object should be laid out right-to-left or left-to-right.

int QTextInlineObject::textPosition() const

The position of the inline object within the text layout.

qreal QTextInlineObject::width() const

Returns the inline object's width.

See alsosetWidth(),ascent(),descent(), andrect().

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


[8]ページ先頭

©2009-2025 Movatter.jp