Auf dieser Seite

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

Header: #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
(since 6.3) bool operator!=(const QTableWidgetSelectionRange &lhs, const QTableWidgetSelectionRange &rhs)
(since 6.3) bool operator==(const QTableWidgetSelectionRange &lhs, const QTableWidgetSelectionRange &rhs)

Ausführliche Beschreibung

Die Klasse `QTableWidgetSelectionRange` speichert die Zeilen und Spalten an der oberen linken und unteren rechten Ecke eines Auswahlbereichs in einer Tabelle. Die Auswahlen in der Tabelle können aus mehreren Auswahlbereichen bestehen.

Hinweis: Wenn ein Element innerhalb des Auswahlbereichs als nicht auswählbar markiert ist, z. B. mit ` itemFlags() & Qt::ItemIsSelectable == 0 `, wird es nicht im Auswahlbereich angezeigt.

Siehe auch ` QTableWidget`.

Dokumentation zu den Member-Funktionen

[constexpr noexcept default] QTableWidgetSelectionRange::QTableWidgetSelectionRange()

Erstellt einen leeren Tabellenauswahlbereich, d. h. einen Bereich, dessen Werte für „ rowCount()“ und „ columnCount()“ 0 sind.

Siehe auch topRow(), leftColumn(), bottomRow() und rightColumn().

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

Erstellt den Tabellenauswahlbereich aus den angegebenen Tabellenzeilen und -spalten unter top, left, bottom und right.

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 entspricht „ 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 entspricht 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 identisch sind, andernfalls „false“.

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 „false“.

Diese Funktion wurde in Qt 6.3 eingeführt.

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