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.