QTableWidgetSelectionRange Class
La clase QTableWidgetSelectionRange permite interactuar con la selección en un modelo sin necesidad de utilizar índices de modelo ni un modelo de selección. Más información...
| Encabezado: | #include <QTableWidgetSelectionRange> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Widgets) target_link_libraries(mytarget PRIVATE Qt6::Widgets) |
| qmake: | QT += widgets |
Funciones 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 |
Elementos no miembros relacionados
(since 6.3) bool | operator!=(const QTableWidgetSelectionRange &lhs, const QTableWidgetSelectionRange &rhs) |
(since 6.3) bool | operator==(const QTableWidgetSelectionRange &lhs, const QTableWidgetSelectionRange &rhs) |
Descripción detallada
La clase QTableWidgetSelectionRange almacena las filas y columnas de la esquina superior izquierda y de la esquina inferior derecha de un rango de selección en una tabla. Las selecciones de la tabla pueden estar formadas por varios rangos de selección.
Nota: Si un elemento dentro del rango de selección está marcado como no seleccionable, por ejemplo, itemFlags() & Qt::ItemIsSelectable == 0, no aparecerá en el rango de selección.
Véase también ` QTableWidget`.
Documentación de funciones de miembro
[constexpr noexcept default] QTableWidgetSelectionRange::QTableWidgetSelectionRange()
Crea un rango de selección de tabla vacío, es decir, un rango cuyos valores « rowCount()» y « columnCount()» son 0.
Véanse también topRow(), leftColumn(), bottomRow() y rightColumn().
QTableWidgetSelectionRange::QTableWidgetSelectionRange(int top, int left, int bottom, int right)
Crea el rango de selección de la tabla a partir de las filas y columnas de las tablas indicadas: top, left, bottom y right.
Véanse también topRow(), leftColumn(), bottomRow() y rightColumn().
int QTableWidgetSelectionRange::bottomRow() const
Devuelve la fila inferior del rango.
Véase también topRow(), rightColumn() y rowCount().
int QTableWidgetSelectionRange::columnCount() const
Devuelve el número de columnas del rango.
Esto equivale a rightColumn() - leftColumn() + 1.
Véase también rowCount(), leftColumn() y rightColumn().
int QTableWidgetSelectionRange::leftColumn() const
Devuelve la columna de la izquierda del rango.
Véase también rightColumn(), topRow() y columnCount().
int QTableWidgetSelectionRange::rightColumn() const
Devuelve la columna de la derecha del rango.
Véanse también leftColumn(), bottomRow() y columnCount().
int QTableWidgetSelectionRange::rowCount() const
Devuelve el número de filas del rango.
Esto equivale a bottomRow() - topRow() + 1.
Véase también columnCount(), topRow() y bottomRow().
int QTableWidgetSelectionRange::topRow() const
Devuelve la fila superior del rango.
Véase también bottomRow(), leftColumn() y rowCount().
Elementos no miembros relacionados
[noexcept, since 6.3] bool operator!=(const QTableWidgetSelectionRange &lhs, const QTableWidgetSelectionRange &rhs)
Devuelve «true» si lhs y rhs no son iguales; en caso contrario, devuelve «false».
Esta función se introdujo en Qt 6.3.
[noexcept, since 6.3] bool operator==(const QTableWidgetSelectionRange &lhs, const QTableWidgetSelectionRange &rhs)
Devuelve «true» si lhs y rhs son iguales; en caso contrario, devuelve «false».
Esta función se introdujo en 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.