The common grouping text objects are lists ( PySide.QtGui.QTextList ), frames ( PySide.QtGui.QTextFrame ), and tables ( PySide.QtGui.QTextTable ). A text object has an associated PySide.QtGui.QTextObject.format() and PySide.QtGui.QTextObject.document() .
There are essentially two kinds of text objects: those that are used with blocks (block formats), and those that are used with characters (character formats). The first kind are derived from PySide.QtGui.QTextBlockGroup , and the second kind from PySide.QtGui.QTextFrame .
You rarely need to use this class directly. When creating custom text objects, you will also need to reimplement QTextDocument.createObject() which acts as a factory method for creating text objects.
PySide.QtGui.QTextDocument Text Object Example
|Parameters:||doc – PySide.QtGui.QTextDocument|
Creates a new PySide.QtGui.QTextObject for the given document .
This function should never be called directly, but only from QTextDocument.createObject() .
Returns the document this object belongs to.
Returns the text object’s format.
Returns the index of the object’s format in the document’s internal list of formats.
Returns the object index of this object. This can be used together with QTextFormat.setObjectIndex() .