实例化 QItemSelectionModel 以用于结合 QAbstractItemModel 及支持它的任何视图。 更多...
import 语句: | import QtQml.Models 2.2 |
Since: | Qt 5.5 |
实例化: | QItemSelectionModel |
另请参阅 QItemSelectionModel and Models and Views in Qt Quick .
使用 setCurrentIndex() to set its value.
另请参阅 setCurrentIndex() and currentChanged() .
It will trigger property binding updates every time selectionChanged() is emitted, even though its value hasn't changed.
另请参阅 selection(), selectedIndexes , select() ,和 selectionChanged() .
This property's value must match the view's model.
Contains the list of all the indexes in the selection model.
Holds the selection ranges stored in the selection model.
currentChanged ( QModelIndex current , QModelIndex previous ) |
此信号被发射每当当前项改变。 previous model item index is replaced by the current index as the selection's current item.
Note that this signal will not be emitted when the item model is reset.
另请参阅 currentIndex(), setCurrentIndex() ,和 selectionChanged() .
selectionChanged ( QItemSelection selected , QItemSelection deselected ) |
This signal is emitted whenever the selection changes. The change in the selection is represented as an item selection of deselected items and an item selection of selected 项。
Note the that the current index changes independently from the selection. Also note that this signal will not be emitted when the item model is reset.
另请参阅 select() and currentChanged() .
清零选定模型。发射 selectionChanged() and currentChanged() .
清零当前索引。发射 currentChanged() .
Clears the selection in the selection model. Emits selectionChanged() .
bool columnIntersectsSelection ( int column , QModelIndex parent ) |
返回
true
若有选中任何项在
column
采用给定
parent
.
返回
true
if all items are selected in the
column
采用给定
parent
.
Note that this function is usually faster than calling isSelected() on all items in the same column, and that unselectable items are ignored.
返回
true
if all items are selected in the
row
采用给定
parent
.
Note that this function is usually faster than calling isSelected() on all items in the same row, and that unselectable items are ignored.
返回
true
若给定模型项
index
被选中。
Clears the selection model. Does not emit any signals.
bool rowIntersectsSelection ( int row , QModelIndex parent ) |
返回
true
若有选中任何项在
row
采用给定
parent
.
void select ( QItemSelection selection , SelectionFlags 命令 ) |
返回的索引在给定 row 对于选中所有行的列而言。
另请参阅 selectedRows() .
返回的索引在给定 column 对于选中所有列的行而言。
另请参阅 selectedColumns() .
void setCurrentIndex ( QModelIndex index , SelectionFlags 命令 ) |