# QTreeWidget Class Reference

### [com.trolltech.qt.gui package]

Inherits QTreeView.

### Constructor

- void QTreeWidget(QWidget parent)

### Constructor Properties

- prototype: The QTreeWidget prototype object

### Prototype Object Properties

The QTreeWidget prototype object inherits properties from the QTreeView prototype object and also has the following properties.

- void addTopLevelItem(QTreeWidgetItem item)
- void addTopLevelItems(List items)
- void closePersistentEditor(QTreeWidgetItem item, int column)
- int currentColumn()
- QTreeWidgetItem currentItem()
- void editItem(QTreeWidgetItem item, int column)
- List findItems(String text, MatchFlags flags, int column)
- QTreeWidgetItem headerItem()
- int indexOfTopLevelItem(QTreeWidgetItem item)
- void insertTopLevelItem(int index, QTreeWidgetItem item)
- void insertTopLevelItems(int index, List items)
- QTreeWidgetItem invisibleRootItem()
- bool isFirstItemColumnSpanned(QTreeWidgetItem item)
- QTreeWidgetItem itemAbove(QTreeWidgetItem item)
- QTreeWidgetItem itemAt(QPoint p)
- QTreeWidgetItem itemBelow(QTreeWidgetItem item)
- QWidget itemWidget(QTreeWidgetItem item, int column)
- void openPersistentEditor(QTreeWidgetItem item, int column)
- void removeItemWidget(QTreeWidgetItem item, int column)
- List selectedItems()
- void setCurrentItem(QTreeWidgetItem item)
- void setFirstItemColumnSpanned(QTreeWidgetItem item, bool span)
- void setHeaderItem(QTreeWidgetItem item)
- void setHeaderLabel(String label)
- void setHeaderLabels(List labels)
- void setItemWidget(QTreeWidgetItem item, int column, QWidget widget)
- int sortColumn()
- void sortItems(int column, SortOrder order)
- QTreeWidgetItem takeTopLevelItem(int index)
- QTreeWidgetItem topLevelItem(int index)
- QRect visualItemRect(QTreeWidgetItem item)

### Instance Properties

QTreeWidget objects inherit properties from the QTreeWidget prototype object and also have the following properties.

- columnCount
- topLevelItemCount