Logo Search packages:      
Sourcecode: qt4-x11 version File versions  Download package

void QItemSelectionModel::clear (  )  [virtual, slot]

Clears the selection model. Emits selectionChanged() and currentChanged().

Definition at line 1028 of file qitemselectionmodel.cpp.

References clearSelection(), currentChanged(), currentColumnChanged(), currentRowChanged(), and QModelIndex::isValid().

Referenced by QListWidget::clear(), QTableWidget::clear(), QTreeWidget::clear(), QTableWidget::clearContents(), and reset().

{
    Q_D(QItemSelectionModel);
    clearSelection();
    QModelIndex previous = d->currentIndex;
    d->currentIndex = QModelIndex();
    if (previous.isValid()) {
        emit currentChanged(d->currentIndex, previous);
        emit currentRowChanged(d->currentIndex, previous);
        emit currentColumnChanged(d->currentIndex, previous);
    }
}


Generated by  Doxygen 1.6.0   Back to index