QTextInlineObject Class Reference

[ QtGui module]

QTextInlineObject 类表示内联对象在 QTextLayout . 更多...

方法


详细描述

QTextInlineObject 类表示内联对象在 QTextLayout .

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

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


方法文档编制

QTextInlineObject.__init__ ( self )

Creates a new inline object for the item at position i in the text engine e .

QTextInlineObject.__init__ ( self , QTextInlineObject )

float QTextInlineObject.ascent ( self )

Returns the inline object's ascent.

另请参阅 setAscent (), descent (), width (),和 rect ().

float QTextInlineObject.descent ( self )

Returns the inline object's descent.

另请参阅 setDescent (), ascent (), width (),和 rect ().

QTextFormat QTextInlineObject.format ( self )

Returns format of the inline object within the text layout.

int QTextInlineObject.formatIndex ( self )

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

float QTextInlineObject.height ( self )

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

另请参阅 ascent (), descent (), width (),和 rect ().

bool QTextInlineObject.isValid ( self )

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

QRectF QTextInlineObject.rect ( self )

Returns the inline object's rectangle.

另请参阅 ascent (), descent (),和 width ().

QTextInlineObject.setAscent ( self , float  a )

Sets the inline object's ascent to a .

另请参阅 ascent (), setDescent (), width (),和 rect ().

QTextInlineObject.setDescent ( self , float  d )

Sets the inline object's decent to d .

另请参阅 descent (), setAscent (), width (),和 rect ().

QTextInlineObject.setWidth ( self , float  w )

Sets the inline object's width to w .

另请参阅 width (), ascent (), descent (),和 rect ().

Qt.LayoutDirection QTextInlineObject.textDirection ( self )

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

int QTextInlineObject.textPosition ( self )

The position of the inline object within the text layout.

float QTextInlineObject.width ( self )

Returns the inline object's width.

另请参阅 setWidth (), ascent (), descent (),和 rect ().