QAbstractTextDocumentLayout Class

The QAbstractTextDocumentLayout class is an abstract base class used to implement custom layouts for QTextDocuments. More...

Header: #include <QAbstractTextDocumentLayout>
qmake: QT += gui
Inherits: QObject
Inherited By:

QPlainTextDocumentLayout

Note: All functions in this class are reentrant.

Public Types

struct PaintContext
struct Selection

Detailed Description

The standard layout provided by Qt can handle simple word processing including inline images, lists and tables.

Some applications, e.g., a word processor or a DTP application might need more features than the ones provided by Qt's layout engine, in which case you can subclass QAbstractTextDocumentLayout to provide custom layout behavior for your text documents.

An instance of the QAbstractTextDocumentLayout subclass can be installed on a QTextDocument object with the setDocumentLayout() function.

You can insert custom objects into a QTextDocument; see the QTextObjectInterface class description for details.

See also QTextObjectInterface.