QTableWidgetSelectionRange Class Reference

[ QtGui module]

The QTableWidgetSelectionRange class provides a way to interact with selection in a model without using model indexes and a selection model. 更多...

方法


详细描述

The QTableWidgetSelectionRange class provides a way to interact with selection in a model without using model indexes and a selection model.

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.


方法文档编制

QTableWidgetSelectionRange.__init__ ( self )

Constructs an table selection range, i.e. a range whose rowCount () 和 columnCount () are 0.

QTableWidgetSelectionRange.__init__ ( self , int  top , int  left , int  bottom , int  right )

Constructs the table selection range from the given top , left , bottom and right table rows and columns.

另请参阅 topRow (), leftColumn (), bottomRow (),和 rightColumn ().

QTableWidgetSelectionRange.__init__ ( self , QTableWidgetSelectionRange   other )

Constructs a the table selection range by copying the given other table selection range.

int QTableWidgetSelectionRange.bottomRow ( self )

Returns the bottom row of the range.

另请参阅 topRow (), rightColumn (), and rowCount ().

int QTableWidgetSelectionRange.columnCount ( self )

Returns the number of columns in the range.

这相当于 rightColumn () - leftColumn () + 1.

该函数在 Qt 4.1 引入。

另请参阅 rowCount (), leftColumn (),和 rightColumn ().

int QTableWidgetSelectionRange.leftColumn ( self )

Returns the left column of the range.

另请参阅 rightColumn (), topRow (),和 columnCount ().

int QTableWidgetSelectionRange.rightColumn ( self )

Returns the right column of the range.

另请参阅 leftColumn (), bottomRow (),和 columnCount ().

int QTableWidgetSelectionRange.rowCount ( self )

Returns the number of rows in the range.

这相当于 bottomRow () - topRow () + 1.

该函数在 Qt 4.1 引入。

另请参阅 columnCount (), topRow (),和 bottomRow ().

int QTableWidgetSelectionRange.topRow ( self )

Returns the top row of the range.

另请参阅 bottomRow (), leftColumn (),和 rowCount ().