QTableWidgetSelectionRange Class
Die Klasse QTableWidgetSelectionRange bietet eine Möglichkeit, mit der Auswahl in einem Modell zu interagieren, ohne Modellindizes und ein Auswahlmodell zu verwenden. Mehr...
Kopfzeile: | #include <QTableWidgetSelectionRange> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Widgets) target_link_libraries(mytarget PRIVATE Qt6::Widgets) |
qmake: | QT += widgets |
Öffentliche Funktionen
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 |
Verwandte Nicht-Mitglieder
(since 6.3) bool | operator!=(const QTableWidgetSelectionRange &lhs, const QTableWidgetSelectionRange &rhs) |
(since 6.3) bool | operator==(const QTableWidgetSelectionRange &lhs, const QTableWidgetSelectionRange &rhs) |
Detaillierte Beschreibung
Die Klasse QTableWidgetSelectionRange speichert die oberen linken und unteren rechten Zeilen und Spalten eines Auswahlbereichs in einer Tabelle. Die Selektionen in der Tabelle können aus mehreren Selektionsbereichen bestehen.
Hinweis: Wenn das Element innerhalb des Auswahlbereichs als nicht auswählbar markiert ist, z.B. itemFlags() & Qt::ItemIsSelectable == 0
, dann wird es nicht im Auswahlbereich erscheinen.
Siehe auch QTableWidget.
Dokumentation der Mitgliedsfunktionen
[constexpr noexcept]
QTableWidgetSelectionRange::QTableWidgetSelectionRange()
Konstruiert einen leeren Tabellenauswahlbereich, d. h. einen Bereich, dessen rowCount() und columnCount() 0 sind.
Siehe auch topRow(), leftColumn(), bottomRow(), und rightColumn().
QTableWidgetSelectionRange::QTableWidgetSelectionRange(int top, int left, int bottom, int right)
Konstruiert den Tabellenauswahlbereich aus den angegebenen top, left, bottom und right Tabellenzeilen und -spalten.
Siehe auch topRow(), leftColumn(), bottomRow(), und rightColumn().
int QTableWidgetSelectionRange::bottomRow() const
Gibt die unterste Zeile des Bereichs zurück.
Siehe auch topRow(), rightColumn(), und rowCount().
int QTableWidgetSelectionRange::columnCount() const
Gibt die Anzahl der Spalten im Bereich zurück.
Dies ist gleichbedeutend mit rightColumn() - leftColumn() + 1.
Siehe auch rowCount(), leftColumn(), und rightColumn().
int QTableWidgetSelectionRange::leftColumn() const
Gibt die linke Spalte des Bereichs zurück.
Siehe auch rightColumn(), topRow(), und columnCount().
int QTableWidgetSelectionRange::rightColumn() const
Gibt die rechte Spalte des Bereichs zurück.
Siehe auch leftColumn(), bottomRow(), und columnCount().
int QTableWidgetSelectionRange::rowCount() const
Gibt die Anzahl der Zeilen im Bereich zurück.
Dies ist gleichbedeutend mit bottomRow() - topRow() + 1.
Siehe auch columnCount(), topRow(), und bottomRow().
int QTableWidgetSelectionRange::topRow() const
Gibt die oberste Zeile des Bereichs zurück.
Siehe auch bottomRow(), leftColumn(), und rowCount().
Verwandte Nicht-Mitglieder
[noexcept, since 6.3]
bool operator!=(const QTableWidgetSelectionRange &lhs, const QTableWidgetSelectionRange &rhs)
Gibt true zurück, wenn lhs und rhs nicht gleich sind, andernfalls wird false zurückgegeben.
Diese Funktion wurde in Qt 6.3 eingeführt.
[noexcept, since 6.3]
bool operator==(const QTableWidgetSelectionRange &lhs, const QTableWidgetSelectionRange &rhs)
Gibt true zurück, wenn lhs und rhs gleich sind, andernfalls wird false zurückgegeben.
Diese Funktion wurde in Qt 6.3 eingeführt.
© 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.