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

void QTreeWidget::setItemWidget ( QTreeWidgetItem item,
int  column,
QWidget widget 
)

Since:
4.1
Sets the widget to be displayed in the cell specified by item and the given column.

This function should only be used to display static content in the place of a tree widget item. If you want to display custom dynamic content or implement a custom editor widget, use QTreeView and subclass QItemDelegate instead.

See also:
{Delegate Classes}

Definition at line 2215 of file qtreewidget.cpp.

References QAbstractItemModel::index(), QModelIndex::model(), and QAbstractItemView::setIndexWidget().

{
    Q_ASSERT(item);
    Q_ASSERT(widget);
    Q_D(QTreeWidget);
    QModelIndex index = d->model()->index(item, column);
    QAbstractItemView::setIndexWidget(index, widget);
}


Generated by  Doxygen 1.6.0   Back to index