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

void QTreeWidget::collapseItem ( const QTreeWidgetItem item  )  [slot]

Closes the item. This causes the tree containing the item's children to be collapsed.

Definition at line 2369 of file qtreewidget.cpp.

References QTreeView::collapse(), QAbstractItemModel::index(), and QModelIndex::model().

{
    Q_ASSERT(item);
    Q_D(QTreeWidget);
    QModelIndex index = d->model()->index(const_cast<QTreeWidgetItem*>(item), 0);
    collapse(index);
}


Generated by  Doxygen 1.6.0   Back to index