ItemSelectionModel QML Type

Instantiates a QItemSelectionModel to be used in conjunction with a QAbstractItemModel and any view supporting it. 更多...

Import Statement: import QtQml.Models 2.2
开始支持版本: Qt 5.5
Instantiates: QItemSelectionModel

属性

信号

方法

详细描述

This page only enumerates the properties, methods, and signals available in QML. See QItemSelectionModel for the actual documentation of this class.

参见 QItemSelectionModel and Models and Views in Qt Quick.

属性

[read-only] currentIndex : QModelIndex

Use setCurrentIndex() to set its value.

参见 setCurrentIndex() and currentChanged().


[read-only] hasSelection : bool

It will trigger property binding updates every time selectionChanged() is emitted, even though its value hasn't changed.

参见 selection(), selectedIndexes, select(), and selectionChanged().


model : QAbstractItemModel

This property's value must match the view's model.


[read-only] selectedIndexes : QModelIndexList

Contains the list of all the indexes in the selection model.


信号

currentChanged(QModelIndex current, QModelIndex previous)


selectionChanged(QItemSelection selected, QItemSelection deselected)


成员

void clear()


void clearCurrentIndex()


void clearSelection()


bool columnIntersectsSelection(int column, QModelIndex parent)


bool isColumnSelected(int column, QModelIndex parent)


bool isRowSelected(int row, QModelIndex parent)


bool isSelected(QModelIndex index)


void reset()


bool rowIntersectsSelection(int row, QModelIndex parent)


void select(QItemSelection selection, SelectionFlags command)


void select(QModelIndex index, SelectionFlags command)


QModelIndexList selectedColumns(int row)


QModelIndexList selectedRows(int column)


QItemSelection selection()


void setCurrentIndex(QModelIndex index, SelectionFlags command)