QTextBlockUserData Class
QTextBlockUserData クラスは、テキストのブロックにカスタムデータを関連付けるために使用されます。詳細...
| ヘッダー: | #include <QTextBlockUserData> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui) target_link_libraries(mytarget PRIVATE Qt6::Gui) |
| qmake: | QT += gui |
- 継承されたメンバーを含む、すべてのメンバーの一覧
- QTextBlockUserData は、リッチテキスト処理 API の一部です。
注:このクラスのすべての関数は再入可能です。
パブリック関数
| virtual | ~QTextBlockUserData() |
詳細な説明
QTextBlockUserData は、QTextDocument 内のテキストブロックにアプリケーション固有のユーザーデータを関連付けるために使用されるコンテナクラス向けの抽象インターフェースを提供します。
通常、このクラスのサブクラスは、データの保存および取得を可能にする関数を提供し、そのインスタンスはQTextBlock::setUserData() を使用してテキストブロックに紐付けられます。これにより、アプリケーションが安全に取得できる形で、テキストブロックごとに追加データを保存することが可能になります。
各サブクラスは、ユーザーデータオブジェクトが破棄された際に、プライベートデータが自動的にクリーンアップされるように、デストラクタの再実装を提供する必要があります。
QTextBlockも参照してください 。
© 2026 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.