QTableWidgetSelectionRange Class
QTableWidgetSelectionRange クラスは、モデルインデックスや選択モデルを使用せずに、モデル内の選択範囲を操作する方法を提供します。詳細...
| ヘッダー: | #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 |
関連する非メンバー
(since 6.3) bool | operator!=(const QTableWidgetSelectionRange &lhs, const QTableWidgetSelectionRange &rhs) |
(since 6.3) bool | operator==(const QTableWidgetSelectionRange &lhs, const QTableWidgetSelectionRange &rhs) |
詳細な説明
QTableWidgetSelectionRange クラスは、テーブル内の選択範囲の左上および右下の行と列を格納します。テーブル内の選択範囲は、複数の選択範囲から構成される場合があります。
注: 選択範囲内の項目が、itemFlags() & Qt::ItemIsSelectable == 0 のように「選択不可」としてマークされている場合 、その項目は選択範囲に表示されません。
QTableWidgetも参照してください 。
メンバ関数のドキュメント
[constexpr noexcept default] QTableWidgetSelectionRange::QTableWidgetSelectionRange()
空のテーブル選択範囲、すなわち、rowCount() およびcolumnCount() の値が 0 である範囲を作成します。
topRow()、leftColumn()、bottomRow()、およびrightColumn()も参照してください 。
QTableWidgetSelectionRange::QTableWidgetSelectionRange(int top, int left, int bottom, int right)
指定されたtop 、left 、bottom 、およびright のテーブルの行と列から、テーブルの選択範囲を構築します。
topRow()、leftColumn()、bottomRow()、およびrightColumn()も参照してください 。
int QTableWidgetSelectionRange::bottomRow() const
範囲の最下行を返します。
topRow()、rightColumn()、およびrowCount()も参照してください 。
int QTableWidgetSelectionRange::columnCount() const
範囲内の列数を返します。
これは、rightColumn() -leftColumn() + 1 と同等です。
rowCount()、leftColumn()、およびrightColumn()も参照してください 。
int QTableWidgetSelectionRange::leftColumn() const
範囲の左側の列を返します。
rightColumn()、topRow()、およびcolumnCount()も参照してください 。
int QTableWidgetSelectionRange::rightColumn() const
範囲の右側の列を返します。
leftColumn()、bottomRow()、およびcolumnCount()も参照してください 。
int QTableWidgetSelectionRange::rowCount() const
指定された範囲の行数を返します。
これは、bottomRow() -topRow() + 1 と同等です。
columnCount()、topRow()、およびbottomRow()も参照してください 。
int QTableWidgetSelectionRange::topRow() const
範囲の最上段を返します。
bottomRow()、leftColumn()、およびrowCount()も参照してください 。
関連する非メンバー関数
[noexcept, since 6.3] bool operator!=(const QTableWidgetSelectionRange &lhs, const QTableWidgetSelectionRange &rhs)
lhs とrhs が等しくない場合は true を返し、それ以外の場合は false を返します。
この関数は Qt 6.3 で導入されました。
[noexcept, since 6.3] bool operator==(const QTableWidgetSelectionRange &lhs, const QTableWidgetSelectionRange &rhs)
lhs とrhs が等しい場合は true を返し、そうでない場合は false を返します。
この関数は 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.