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

src.gui.itemviews.qtreewidget.cpp

//! [0]
    QTreeWidget *treeWidget = new QTreeWidget();
    treeWidget->setColumnCount(1);
    QList<QTreeWidgetItem *> items;
    for (int i = 0; i < 10; ++i)
        items.append(new QTreeWidgetItem((QTreeWidget*)0, QStringList(QString("item: %1").arg(i))));
    treeWidget->insertTopLevelItems(0, items);
//! [0]



Generated by  Doxygen 1.6.0   Back to index