The QTableWidgetSelectionRange class provides a way to interact with selection in a model without using model indexes and a selection model. 更多...
| 頭: |
#include <QTableWidgetSelectionRange>
|
| CMake: |
find_package(Qt6 REQUIRED COMPONENTS Widgets)
target_link_libraries(mytarget PRIVATE Qt6::Widgets)
|
| qmake: |
QT += widgets
|
| 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 |
(從 6.3 起)
bool
|
operator!= (const QTableWidgetSelectionRange & lhs , const QTableWidgetSelectionRange & rhs ) |
(從 6.3 起)
bool
|
operator== (const QTableWidgetSelectionRange & lhs , const QTableWidgetSelectionRange & rhs ) |
The QTableWidgetSelectionRange class stores the top left and bottom right rows and columns of a selection range in a table. The selections in the table may consist of several selection ranges.
注意:
If the item within the selection range is marked as not selectable, e.g.,
itemFlags() & Qt::ItemIsSelectable == 0
then it will not appear in the selection range.
另請參閱 QTableWidget .
[constexpr noexcept]
QTableWidgetSelectionRange::
QTableWidgetSelectionRange
()
Constructs an empty table selection range, i.e. a range whose rowCount () 和 columnCount () are 0.
另請參閱 topRow (), leftColumn (), bottomRow (),和 rightColumn ().
Constructs the table selection range from the given top , left , bottom and right table rows and columns.
另請參閱 topRow (), leftColumn (), bottomRow (),和 rightColumn ().
Returns the bottom row of the range.
另請參閱 topRow (), rightColumn (),和 rowCount ().
Returns the number of columns in the range.
這相當於 rightColumn () - leftColumn () + 1.
另請參閱 rowCount (), leftColumn (),和 rightColumn ().
Returns the left column of the range.
另請參閱 rightColumn (), topRow (),和 columnCount ().
Returns the right column of the range.
另請參閱 leftColumn (), bottomRow (),和 columnCount ().
Returns the number of rows in the range.
這相當於 bottomRow () - topRow () + 1.
另請參閱 columnCount (), topRow (),和 bottomRow ().
Returns the top row of the range.
另請參閱 bottomRow (), leftColumn (),和 rowCount ().
[noexcept, since 6.3]
bool
operator!=
(const
QTableWidgetSelectionRange
&
lhs
, const
QTableWidgetSelectionRange
&
rhs
)
返迴 true 若 lhs and rhs are not equal, otherwise returns false.
該函數在 Qt 6.3 引入。
[noexcept, since 6.3]
bool
operator==
(const
QTableWidgetSelectionRange
&
lhs
, const
QTableWidgetSelectionRange
&
rhs
)
返迴 true 若 lhs and rhs are equal, otherwise returns false.
該函數在 Qt 6.3 引入。