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

QTreeWidget::QTreeWidget ( QWidget parent = 0  )  [explicit]

Constructs a tree widget with the given parent.

Definition at line 1798 of file qtreewidget.cpp.

References QAbstractItemView::activated(), QAbstractItemView::clicked(), QTreeView::collapsed(), QObject::connect(), QAbstractItemView::currentChanged(), QTreeView::dataChanged(), QAbstractItemView::doubleClicked(), QAbstractItemView::entered(), QTreeView::expanded(), QTreeView::header(), itemSelectionChanged(), QAbstractItemView::model(), QAbstractItemView::pressed(), QAbstractItemView::selectionChanged(), QAbstractItemView::selectionModel(), QHeaderView::setClickable(), and QTreeView::setModel().

    : QTreeView(*new QTreeWidgetPrivate(), parent)
{
    QTreeView::setModel(new QTreeModel(0, this));
    // view signals
    connect(this, SIGNAL(pressed(QModelIndex)), SLOT(emitItemPressed(QModelIndex)));
    connect(this, SIGNAL(clicked(QModelIndex)), SLOT(emitItemClicked(QModelIndex)));
    connect(this, SIGNAL(doubleClicked(QModelIndex)), SLOT(emitItemDoubleClicked(QModelIndex)));
    connect(this, SIGNAL(activated(QModelIndex)), SLOT(emitItemActivated(QModelIndex)));
    connect(this, SIGNAL(entered(QModelIndex)), SLOT(emitItemEntered(QModelIndex)));
    connect(this, SIGNAL(expanded(QModelIndex)), SLOT(emitItemExpanded(QModelIndex)));
    connect(this, SIGNAL(collapsed(QModelIndex)), SLOT(emitItemCollapsed(QModelIndex)));
    // selection signals
    connect(selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)),
            this, SLOT(emitCurrentItemChanged(QModelIndex,QModelIndex)));
    connect(selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
            this, SIGNAL(itemSelectionChanged()));
    // model signals
    connect(model(), SIGNAL(dataChanged(QModelIndex,QModelIndex)),
            this, SLOT(emitItemChanged(QModelIndex)));

    header()->setClickable(false);
}


Generated by  Doxygen 1.6.0   Back to index