QTableWidgetSelectionRange Class
La classe QTableWidgetSelectionRange permet d'interagir avec la sélection dans un modèle sans utiliser d'index de modèle ni de modèle de sélection. Plus d'informations...
| En-tête : | #include <QTableWidgetSelectionRange> |
| CMake : | find_package(Qt6 REQUIRED COMPONENTS Widgets)target_link_libraries(mytarget PRIVATE Qt6::Widgets) |
| qmake : | QT += widgets |
Fonctions publiques
| 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 |
Non-membres apparentés
(since 6.3) bool | operator!=(const QTableWidgetSelectionRange &lhs, const QTableWidgetSelectionRange &rhs) |
(since 6.3) bool | operator==(const QTableWidgetSelectionRange &lhs, const QTableWidgetSelectionRange &rhs) |
Description détaillée
La classe QTableWidgetSelectionRange stocke les lignes et colonnes en haut à gauche et en bas à droite d'une plage de sélection dans un tableau. Les sélections du tableau peuvent être constituées de plusieurs plages de sélection.
Remarque : si l'élément de la plage de sélection est marqué comme non sélectionnable, par exemple itemFlags() & Qt::ItemIsSelectable == 0, il n'apparaîtra pas dans la plage de sélection.
Voir également QTableWidget.
Documentation sur les fonctions membres
[constexpr noexcept] QTableWidgetSelectionRange::QTableWidgetSelectionRange()
Construit une plage de sélection de table vide, c'est-à-dire une plage dont les valeurs rowCount() et columnCount() sont 0.
Voir aussi topRow(), leftColumn(), bottomRow() et rightColumn().
QTableWidgetSelectionRange::QTableWidgetSelectionRange(int top, int left, int bottom, int right)
Construit la plage de sélection de la table à partir des lignes et des colonnes des tables top, left, bottom et right données.
Voir aussi topRow(), leftColumn(), bottomRow() et rightColumn().
int QTableWidgetSelectionRange::bottomRow() const
Renvoie la ligne inférieure de la plage.
Voir aussi topRow(), rightColumn() et rowCount().
int QTableWidgetSelectionRange::columnCount() const
Renvoie le nombre de colonnes dans l'intervalle.
Ceci est équivalent à rightColumn() - leftColumn() + 1.
Voir aussi rowCount(), leftColumn() et rightColumn().
int QTableWidgetSelectionRange::leftColumn() const
Renvoie la colonne gauche de la plage.
Voir aussi rightColumn(), topRow() et columnCount().
int QTableWidgetSelectionRange::rightColumn() const
Renvoie la colonne de droite de la plage.
Voir aussi leftColumn(), bottomRow() et columnCount().
int QTableWidgetSelectionRange::rowCount() const
Renvoie le nombre de lignes dans l'intervalle.
Ceci est équivalent à bottomRow() - topRow() + 1.
Voir aussi columnCount(), topRow() et bottomRow().
int QTableWidgetSelectionRange::topRow() const
Renvoie la ligne supérieure de la plage.
Voir également bottomRow(), leftColumn() et rowCount().
Non-membres apparentés
[noexcept, since 6.3] bool operator!=(const QTableWidgetSelectionRange &lhs, const QTableWidgetSelectionRange &rhs)
Retourne true si lhs et rhs ne sont pas égaux, sinon retourne false.
Cette fonction a été introduite dans Qt 6.3.
[noexcept, since 6.3] bool operator==(const QTableWidgetSelectionRange &lhs, const QTableWidgetSelectionRange &rhs)
Retourne vrai si lhs et rhs sont égaux, sinon retourne faux.
Cette fonction a été introduite dans 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.