class QTextBlockUserData

The QTextBlockUserData class is used to associate custom data with blocks of text. More

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

Detailed Description

QTextBlockUserData provides an abstract interface for container classes that are used to associate application-specific user data with text blocks in a QTextDocument .

Generally, subclasses of this class provide functions to allow data to be stored and retrieved, and instances are attached to blocks of text using setUserData() . This makes it possible to store additional data per text block in a way that can be retrieved safely by the application.

Each subclass should provide a reimplementation of the destructor to ensure that any private data is automatically cleaned up when user data objects are deleted.

See also

QTextBlock