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

void QTreeWidget::setItemExpanded ( const QTreeWidgetItem item,
bool  expand 

Sets the item referred to by item to either closed or opened, depending on the value of expand.

See also:
expandItem(), collapseItem()

Definition at line 2328 of file qtreewidget.cpp.

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

    QModelIndex index = d->model()->index(const_cast<QTreeWidgetItem*>(item), 0);
    setExpanded(index, expand);

Generated by  Doxygen 1.6.0   Back to index