이 페이지에서

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()

사용자 데이터를 삭제합니다.

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