QTextBlockUserData 类

QTextBlockUserData 类用于将自定义数据关联文本块。 更多...

头: #include <QTextBlockUserData>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: QT += gui

注意: 此类的所有函数 可重入 .

公共函数

virtual ~QTextBlockUserData ()

详细描述

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 QTextBlock::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.

另请参阅 QTextBlock .

成员函数文档编制

[virtual] QTextBlockUserData:: ~QTextBlockUserData ()

销毁用户数据。