QTextBlockGroup Class

QTextBlockGroup 클래스는 QTextDocument.. . 더 보기....

헤더: #include <QTextBlockGroup>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: QT += gui
상속합니다: QTextObject
상속 대상:

QTextList

참고: 이 클래스의 모든 함수는 재진입합니다.

보호된 함수

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()로 반환됩니다. 목록의 블록이 반드시 문서에서 인접한 요소일 필요는 없습니다. 예를 들어 다중 수준 목록의 최상위 항목은 목록의 하위 수준 항목으로 구분됩니다.

QTextBlockQTextDocument참조하세요 .

멤버 함수 문서

[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 을 그룹에서 제거합니다. 블록 자체는 삭제되지 않고 더 이상 이 그룹의 멤버가 아닐 뿐입니다.

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