實例化 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 command ) |
返迴的索引在給定 row 對於選中所有行的列而言。
另請參閱 selectedRows() .
返迴的索引在給定 column 對於選中所有列的行而言。
另請參閱 selectedColumns() .
|
void setCurrentIndex ( QModelIndex index , SelectionFlags command ) |