QTextInlineObject露
The
QTextInlineObjectclass represents an inline object in aQAbstractTextDocumentLayoutand its implementations. More鈥�

Synopsis露
Functions露
def
ascent()def
descent()def
format()def
formatIndex()def
height()def
isValid()def
rect()def
setAscent(a)def
setDescent(d)def
setWidth(w)def
textDirection()def
textPosition()def
width()
Detailed Description露
Normally, you do not need to create a
QTextInlineObject. It is used byQAbstractTextDocumentLayoutto handle inline objects when implementing a custom layout.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 bytextDirection(). Its position in the text layout is given bytextPosition(), and its format is given byformat().
- class PySide2.QtGui.QTextInlineObject露
- PySide2.QtGui.QTextInlineObject.ascent()露
- Return type:
float
Returns the inline object鈥檚 ascent.
See also
- PySide2.QtGui.QTextInlineObject.descent()露
- Return type:
float
Returns the inline object鈥檚 descent.
See also
- PySide2.QtGui.QTextInlineObject.format()露
- Return type:
Returns format of the inline object within the text layout.
- PySide2.QtGui.QTextInlineObject.formatIndex()露
- Return type:
int
Returns an integer describing the format of the inline object within the text layout.
- PySide2.QtGui.QTextInlineObject.height()露
- Return type:
float
Returns the inline object鈥檚 total height. This is equal to
ascent()+descent()+ 1.
- PySide2.QtGui.QTextInlineObject.isValid()露
- Return type:
bool
Returns
trueif this inline object is valid; otherwise returns false.
- PySide2.QtGui.QTextInlineObject.rect()露
- Return type:
Returns the inline object鈥檚 rectangle.
- PySide2.QtGui.QTextInlineObject.setAscent(a)露
- Parameters:
a 鈥� float
Sets the inline object鈥檚 ascent to
a.See also
- PySide2.QtGui.QTextInlineObject.setDescent(d)露
- Parameters:
d 鈥� float
Sets the inline object鈥檚 descent to
d.See also
- PySide2.QtGui.QTextInlineObject.setWidth(w)露
- Parameters:
w 鈥� float
Sets the inline object鈥檚 width to
w.
- PySide2.QtGui.QTextInlineObject.textDirection()露
- Return type:
Returns if the object should be laid out right-to-left or left-to-right.
- PySide2.QtGui.QTextInlineObject.textPosition()露
- Return type:
int
The position of the inline object within the text layout.
- PySide2.QtGui.QTextInlineObject.width()露
- Return type:
float
Returns the inline object鈥檚 width.
See also
漏 2022 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.