QTextBlockUserData Class

QTextBlockUserData クラスは、カスタムデータをテキストブロックに関連付けるために使用します。詳細...

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

注意:このクラスの関数はすべてリエントラントです。

パブリック関数

詳細説明

QTextBlockUserData は、アプリケーション固有のユーザー・データをQTextDocument 内のテキスト・ブロックに関連付けるために使用されるコンテナ・クラス用の抽象インターフェイスを提供します。

一般に、このクラスのサブクラスは、データの格納と取得を可能にする関数を提供し、インスタンスはQTextBlock::setUserData() を使用してテキスト・ブロックにアタッチされます。これにより、アプリケーションで安全に取得できる方法で、テキスト・ブロックごとに追加データを格納することが可能になります。

各サブクラスは、デストラクタの再実装を提供し、ユーザー・データ・オブジェクトが削除されたときにプライベート・データが自動的にクリーンアップされるようにする必要があります。

QTextBlockも参照してください

メンバ関数ドキュメント

[virtual noexcept] QTextBlockUserData::~QTextBlockUserData()

ユーザーデータを破棄する。

© 2025 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.