|qmake:||QT += gui|
Note: All functions in this class are reentrant.
|QTextDocument *||document() const|
- 32 public functions inherited from QObject
- 9 protected functions inherited from QObject
Additional Inherited Members
- 1 property inherited from QObject
- 1 public slot inherited from QObject
- 2 signals inherited from QObject
- 11 static public members inherited from QObject
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 QTextBlockGroup, and the second kind from 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.
Member Function Documentation
[protected] QTextObject::QTextObject(QTextDocument *document)
Creates a new QTextObject for the given document.
Warning: This function should never be called directly, but only from QTextDocument::createObject().
Destroys the text object.
Warning: Text objects are owned by the document, so you should never destroy them yourself.
QTextDocument *QTextObject::document() const
Returns the document this object belongs to.
See also format().
QTextFormat QTextObject::format() const
Returns the text object's format.
Returns the index of the object's format in the document's internal list of formats.
See also QTextDocument::allFormats().
Returns the object index of this object. This can be used together with QTextFormat::setObjectIndex().
[protected] void QTextObject::setFormat(const QTextFormat &format)
Sets the text object's format.
See also format().
© 2018 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.