QTreeWidget*tree = new QTreeWidget();tree->setStyle(QStyleFactory::create("windows"));tree->setHeaderHidden(true);tree->setColumnCount(2);QTreeWidgetItem*treeItemMain = new QTreeWidgetItem(tree);treeItemMain->setText(0, QString::fromUtf8("Дерево приложения"));treeItemMain->setText(1, QString::fromUtf8("Тип ветки"));treeItemMain->setText(2, QString::fromUtf8("Флаг подчинённости"));tree->setColumnWidth(0,200);tree->setColumnHidden(1,true);tree->setColumnWidth(2,10);
QTreeWidget*tree = new QTreeWidget(); tree->setStyle(QStyleFactory::create("windows")); tree->setHeaderHidden(true); tree->setColumnCount(2); tree->header()->setResizeMode(0, QHeaderView::Stretch); tree->header()->setStretchLastSection(false);