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

void QTreeWidget::setItemSelected ( const QTreeWidgetItem item,
bool  select 

If select is true, the given item is selected; otherwise it is deselected.

Definition at line 2240 of file qtreewidget.cpp.

References QAbstractItemModel::index(), QModelIndex::model(), QItemSelectionModel::select(), and QAbstractItemView::selectionModel().

    QModelIndex index = d->model()->index(const_cast<QTreeWidgetItem*>(item), 0);
    selectionModel()->select(index, (select ? QItemSelectionModel::Select
                                     : QItemSelectionModel::Deselect)

Generated by  Doxygen 1.6.0   Back to index