Nesta página

QTableWidgetSelectionRange Class

A classe QTableWidgetSelectionRange oferece uma maneira de interagir com a seleção em um modelo sem utilizar índices de modelo nem um modelo de seleção. Mais...

Cabeçalho: #include <QTableWidgetSelectionRange>
CMake: find_package(Qt6 REQUIRED COMPONENTS Widgets)
target_link_libraries(mytarget PRIVATE Qt6::Widgets)
qmake: QT += widgets

Funções públicas

QTableWidgetSelectionRange()
QTableWidgetSelectionRange(int top, int left, int bottom, int right)
int bottomRow() const
int columnCount() const
int leftColumn() const
int rightColumn() const
int rowCount() const
int topRow() const
(since 6.3) bool operator!=(const QTableWidgetSelectionRange &lhs, const QTableWidgetSelectionRange &rhs)
(since 6.3) bool operator==(const QTableWidgetSelectionRange &lhs, const QTableWidgetSelectionRange &rhs)

Descrição detalhada

A classe QTableWidgetSelectionRange armazena as linhas e colunas do canto superior esquerdo e do canto inferior direito de um intervalo de seleção em uma tabela. As seleções na tabela podem consistir em vários intervalos de seleção.

Observação: Se o item dentro do intervalo de seleção estiver marcado como não selecionável, por exemplo, itemFlags() & Qt::ItemIsSelectable == 0, ele não aparecerá no intervalo de seleção.

Veja também ` QTableWidget`.

Documentação da função de membro

[constexpr noexcept default] QTableWidgetSelectionRange::QTableWidgetSelectionRange()

Cria um intervalo de seleção de tabela vazio, ou seja, um intervalo cujos parâmetros ` rowCount()` e ` columnCount()` são 0.

Veja também topRow(), leftColumn(), bottomRow() e rightColumn().

QTableWidgetSelectionRange::QTableWidgetSelectionRange(int top, int left, int bottom, int right)

Cria o intervalo de seleção da tabela a partir das linhas e colunas fornecidas em top, left, bottom e right.

Veja também topRow(), leftColumn(), bottomRow() e rightColumn().

int QTableWidgetSelectionRange::bottomRow() const

Retorna a linha inferior do intervalo.

Veja também topRow(), rightColumn() e rowCount().

int QTableWidgetSelectionRange::columnCount() const

Retorna o número de colunas no intervalo.

Isso equivale a rightColumn() - leftColumn() + 1.

Veja também rowCount(), leftColumn() e rightColumn().

int QTableWidgetSelectionRange::leftColumn() const

Retorna a coluna esquerda do intervalo.

Veja também rightColumn(), topRow() e columnCount().

int QTableWidgetSelectionRange::rightColumn() const

Retorna a coluna da direita do intervalo.

Veja também leftColumn(), bottomRow() e columnCount().

int QTableWidgetSelectionRange::rowCount() const

Retorna o número de linhas no intervalo.

Isso equivale a bottomRow() - topRow() + 1.

Veja também columnCount(), topRow() e bottomRow().

int QTableWidgetSelectionRange::topRow() const

Retorna a linha superior do intervalo.

Veja também bottomRow(), leftColumn() e rowCount().

Elementos não membros relacionados

[noexcept, since 6.3] bool operator!=(const QTableWidgetSelectionRange &lhs, const QTableWidgetSelectionRange &rhs)

Retorna `true` se ` lhs ` e ` rhs ` não forem iguais; caso contrário, retorna `false`.

Essa função foi introduzida no Qt 6.3.

[noexcept, since 6.3] bool operator==(const QTableWidgetSelectionRange &lhs, const QTableWidgetSelectionRange &rhs)

Retorna `true` se ` lhs ` e ` rhs ` forem iguais; caso contrário, retorna `false`.

Essa função foi introduzida no Qt 6.3.

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