QTreeWidget **treetree= new QTreeWidget*[size]; for(....)tree[i] = new QTreeWidget;
QTreeWidgetItem *item = new QTreeWidgetItem;item->setText(0, t_str);item->setText(1, a_str);item->setText(2, l_str);treeWidget->addTopLevelItem(item);
C++ (Qt)QTreeWidget *w = qobject_cast <QTreeWidget*> (tabWidget->widget (0));if (w) { //Some code}
QTreeWidget *w = qobject_cast <QTreeWidget*> (tabWidget->widget(0)); if (w) {qDebug()<<"TRUE" w->setAlternatingRowColors(true); w->setColumnCount(2); tabWidget->addTab(w,itemout->text(0)); }
QTreeWidget *w = qobject_cast <QTreeWidget*> (tabWidget->widget(i)); if (w) { w->setAlternatingRowColors(true); w->setColumnCount(2); }
tabWidget->addTab(new QTreeWidget(tabWidget),itemout->text(0));w = qobject_cast <QTreeWidget*> (tabWidget->widget(p)); if (w) { w->setAlternatingRowColors(true); w->setColumnCount(2); w->setHeaderLabels(headerTopic); w->setAlternatingRowColors(true); connect(w,SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)),this,SLOT(open_browser())); ............ }
QTreeWidgetItem *item = new QTreeWidgetItem; item->setText(0, t_str); item->setText(1, a_str); item->setText(2, l_str); //item->setText(3, m_str); w->addTopLevelItem(item); //Не въехал...