- class QTableWidgetSelectionRange#
QTableWidgetSelectionRange类提供了一种与模型中的选择进行交互的方式,而无需使用模型索引和选择模型。更多...概述#
方法#
def
__init__()def
bottomRow()def
columnCount()def
leftColumn()def
__ne__()def
__eq__()def
rightColumn()def
rowCount()定义
topRow()
注意
本文档可能包含从 C++ 自动翻译到 Python 的代码片段。我们始终欢迎对片段翻译的贡献。如果您发现翻译有问题,也可以通过创建 https:/bugreports.qt.io/projects/PYSIDE 上的工单来告诉我们
详细描述#
QTableWidgetSelectionRange类存储表中选择范围的左上角和右下角的行列。表中的选择可能包括几个选择范围。- __init__()#
构造一个空的表选择范围,即行数和列数都为 0 的范围。
- __init__(top, left, bottom, right)
- 参数:
top – int
left – int
bottom – int
right – int
从指定的
top、left、bottom和right表行列构造表选择范围。- bottomRow()#
- 返回类型::
int
返回范围的最后一行。
- columnCount()#
- 返回类型::
int
返回范围内列的数量。
这相当于
rightColumn()-leftColumn()+ 1。- leftColumn()#
- 返回类型::
int
返回范围的左侧列。
- __ne__(rhs)#
- 参数:
- 返回类型::
bool
如果
lhs和rhs不相等,则返回 true,否则返回 false。- __eq__(rhs)#
- 参数:
- 返回类型::
bool
如果
lhs和rhs相等,则返回 true,否则返回 false。- rightColumn()#
- 返回类型::
int
返回范围的右侧列。
- rowCount()#
- 返回类型::
int
返回范围内行的数量。
这等价于
bottomRow()-topRow()+ 1。- topRow()#
- 返回类型::
int
返回范围的最上行。