QTextBlockGroup Class
QTextBlockGroup 클래스는 QTextDocument 내의 텍스트 블록을 담을 수 있는 컨테이너를 제공합니다. 더 보기...
| 헤더: | #include <QTextBlockGroup> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui) target_link_libraries(mytarget PRIVATE Qt6::Gui) |
| qmake: | QT += gui |
| 상속: | QTextObject |
| 상속받는 클래스: |
- 상속받은 멤버를 포함한 모든 멤버 목록
- QTextBlockGroup은 리치 텍스트 처리 API의 일부입니다.
참고: 이 클래스의 모든 함수는 재진입 가능합니다.
보호된 함수
| QTextBlockGroup(QTextDocument *document) | |
| virtual | ~QTextBlockGroup() |
| virtual void | blockFormatChanged(const QTextBlock &block) |
| virtual void | blockInserted(const QTextBlock &block) |
| QList<QTextBlock> | blockList() const |
| virtual void | blockRemoved(const QTextBlock &block) |
상세 설명
블록 그룹을 사용하여 문서 내의 텍스트 블록을 구성할 수 있습니다. 블록 그룹은 텍스트 블록이 편집 중일 때도 해당 그룹에 속한 텍스트 블록의 최신 목록을 유지합니다.
각 그룹에는 그룹이 생성될 때 지정되는 상위 문서가 있습니다.
텍스트 블록은 blockInserted()을 사용하여 그룹에 삽입할 수 있으며, blockRemoved()을 사용하여 제거할 수 있습니다. 블록의 서식이 변경되면 blockFormatChanged()이 호출됩니다.
blockList()는 그룹 내 블록 목록을 반환합니다. 목록에 포함된 블록들이 문서 내에서 반드시 인접한 요소인 것은 아니라는 점에 유의하십시오. 예를 들어, 다단계 목록의 최상위 항목들은 목록의 하위 단계 항목들에 의해 분리될 수 있습니다.
QTextBlock 및 QTextDocument도 참조하십시오 .
멤버 함수 문서
[explicit protected] QTextBlockGroup::QTextBlockGroup(QTextDocument *document)
지정된 document 에 대한 새로운 블록 그룹을 생성합니다.
경고: 이 함수는 QTextDocument::createObject() 내에서만 호출해야 합니다.
[virtual noexcept protected] QTextBlockGroup::~QTextBlockGroup()
이 블록 그룹을 삭제합니다. 블록 자체는 삭제되지 않으며, 단순히 더 이상 이 블록 그룹에 속하지 않게 됩니다.
[virtual protected] void QTextBlockGroup::blockFormatChanged(const QTextBlock &block)
이 함수는 지정된 텍스트의 ‘ block ’가 변경될 때마다 호출됩니다. 해당 텍스트 블록은 이 그룹의 구성원입니다.
기본 클래스의 구현은 아무 작업도 수행하지 않습니다.
[virtual protected] void QTextBlockGroup::blockInserted(const QTextBlock &block)
지정된 ` block `를 그룹의 끝에 추가합니다.
경고: 이 함수를 재구현하는경우 , 반드시 기본 클래스의 구현을 호출해야 합니다.
[protected] QList<QTextBlock> QTextBlockGroup::blockList() const
블록 그룹에 속한 모든 블록의 목록(비어 있을 수도 있음)을 반환합니다.
[virtual protected] void QTextBlockGroup::blockRemoved(const QTextBlock &block)
지정된 ` block `를 그룹에서 제거합니다. 블록 자체는 삭제되지 않으며, 단순히 더 이상 이 그룹의 구성원이 아니게 됩니다.
© 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.