QTextTableCell Class
QTextTableCell 클래스는 QTextTable 에서 셀의 속성을 나타냅니다... .
헤더: | #include <QTextTableCell> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui) target_link_libraries(mytarget PRIVATE Qt6::Gui) |
qmake: | QT += gui |
- 상속된 멤버를 포함한 모든 멤버의 목록
- QTextTableCell은 리치 텍스트 처리 API의 일부입니다.
참고: 이 클래스의 모든 함수는 재진입합니다.
공용 함수
QTextTableCell() | |
QTextTableCell(const QTextTableCell &other) | |
~QTextTableCell() | |
QTextFrame::iterator | begin() const |
int | column() const |
int | columnSpan() const |
QTextFrame::iterator | end() const |
QTextCursor | firstCursorPosition() const |
QTextCharFormat | format() const |
bool | isValid() const |
QTextCursor | lastCursorPosition() const |
int | row() const |
int | rowSpan() const |
void | setFormat(const QTextCharFormat &format) |
int | tableCellFormatIndex() const |
bool | operator!=(const QTextTableCell &other) const |
QTextTableCell & | operator=(const QTextTableCell &other) |
bool | operator==(const QTextTableCell &other) const |
상세 설명
표 셀은 표에 속하는 문서 구조의 일부입니다. 표는 셀을 특정 행과 열로 정렬하며, 셀은 여러 열과 행에 걸쳐 있을 수도 있습니다.
셀은 일반적으로 QTextCursor::insertTable()를 사용하여 표를 문서에 삽입할 때 생성되지만 표의 크기를 조정할 때 생성 및 삭제되기도 합니다.
셀은 표에서 해당 위치에 대한 정보를 포함하며, 셀의 row() 및 column() 번호와 rowSpan() 및 columnSpan()를 확인할 수 있습니다.
셀의 format()는 해당 콘텐츠의 기본 문자 형식을 나타냅니다. firstCursorPosition () 및 lastCursorPosition() 함수는 문서에서 셀의 범위를 가져오는 데 사용됩니다.
QTextTable 및 QTextTableFormat 을참조하세요 .
멤버 함수 문서
QTextTableCell::QTextTableCell()
잘못된 테이블 셀을 생성합니다.
isValid()도 참조하십시오 .
QTextTableCell::QTextTableCell(const QTextTableCell &other)
복사 생성자를 복사합니다. other 셀을 기반으로 새 QTextTableCell 객체를 생성합니다.
[noexcept]
QTextTableCell::~QTextTableCell()
테이블 셀을 파괴합니다.
QTextFrame::iterator QTextTableCell::begin() const
테이블 셀의 시작을 가리키는 프레임 이터레이터를 반환합니다.
end()도 참조하세요 .
int QTextTableCell::column() const
테이블에서 이 셀이 포함된 열의 번호를 반환합니다.
row()도 참조하세요 .
int QTextTableCell::columnSpan() const
이 셀에 포함된 열의 수를 반환합니다. 기본값은 1입니다.
rowSpan()도 참조하세요 .
QTextFrame::iterator QTextTableCell::end() const
테이블 셀의 끝을 가리키는 프레임 이터레이터를 반환합니다.
begin()도 참조하세요 .
QTextCursor QTextTableCell::firstCursorPosition() const
이 셀에서 유효한 첫 번째 커서 위치를 반환합니다.
lastCursorPosition()도 참조하세요 .
QTextCharFormat QTextTableCell::format() const
셀의 문자 형식을 반환합니다.
setFormat()도 참조하세요 .
bool QTextTableCell::isValid() const
유효한 테이블 셀이면 true
을 반환하고, 그렇지 않으면 false를 반환합니다.
QTextCursor QTextTableCell::lastCursorPosition() const
이 셀에서 마지막으로 유효한 커서 위치를 반환합니다.
firstCursorPosition()도 참조하세요 .
int QTextTableCell::row() const
테이블에서 이 셀이 포함된 행의 번호를 반환합니다.
column()도 참조하세요 .
int QTextTableCell::rowSpan() const
이 셀에 포함된 행 수를 반환합니다. 기본값은 1입니다.
columnSpan()도 참조하세요 .
void QTextTableCell::setFormat(const QTextCharFormat &format)
셀의 문자 형식을 format 으로 설정합니다. 예를 들어 전체 셀의 배경색을 변경하는 데 이 기능을 사용할 수 있습니다:
QTextTableCell cell = table->cellAt(2, 3); QTextCharFormat format = cell.format(); format.setBackground(Qt::blue); cell.setFormat(format);
이 기능을 통해 셀의 행 또는 열 스팬은 변경할 수 없습니다. 대신 QTextTable::mergeCells 및 QTextTable::splitCell 을 사용해야 합니다.
format()도 참조하세요 .
int QTextTableCell::tableCellFormatIndex() const
문서의 내부 형식 목록에서 tableCell 형식의 색인을 반환합니다.
QTextDocument::allFormats()도 참조하세요 .
bool QTextTableCell::operator!=(const QTextTableCell &other) const
이 셀 객체와 other 셀 객체가 서로 다른 셀을 설명하면 true
을 반환하고, 그렇지 않으면 false
을 반환합니다.
QTextTableCell &QTextTableCell::operator=(const QTextTableCell &other)
other 테이블 셀을 이 테이블 셀에 할당합니다.
bool QTextTableCell::operator==(const QTextTableCell &other) const
이 셀 객체와 other 셀 객체가 동일한 셀을 설명하는 경우 true
을 반환하고, 그렇지 않으면 false
을 반환합니다.
© 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.