Inherited by: QTextFrame, QTextTable, QTextBlockGroup, QTextList
The PySide.QtGui.QTextObject class is a base class for different kinds of objects that can group parts of a PySide.QtGui.QTextDocument together.
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.
See also
PySide.QtGui.QTextDocument Text Object Example
Parameters: | doc – PySide.QtGui.QTextDocument |
---|
Creates a new PySide.QtGui.QTextObject for the given document .
Warning
This function should never be called directly, but only from QTextDocument.createObject() .
Return type: | PySide.QtGui.QTextDocument |
---|
Returns the document this object belongs to.
See also
Return type: | PySide.QtGui.QTextFormat |
---|
Returns the text object’s format.
Return type: | PySide.QtCore.int |
---|
Returns the index of the object’s format in the document’s internal list of formats.
See also
Return type: | PySide.QtCore.int |
---|
Returns the object index of this object. This can be used together with QTextFormat.setObjectIndex() .
Parameters: | format – PySide.QtGui.QTextFormat |
---|
Sets the text object’s format .
See also