QList<QTreeWidgetItem *> selected = ui->twg->selectedItems();
if(parent) {
tmp->setText(0, "Dude");
parent->addChild(tmp);
}
QList<QTreeWidgetItem *> selected = ui->twg->selectedItems();
QTreeWidgetItem *item = selected.first();
QTreeWidgetItem *parent = item->parent();
if(parent) {
QTreeWidgetItem *tmp = new QTreeWidgetItem(parent);
tmp->setText(0, "Dude");
parent->addChild(tmp);
}
To copy to clipboard, switch view to plain text mode
QList<QTreeWidgetItem *> selected = ui->twg->selectedItems();
if(parent) {
int index = parent->indexOfChild(item);
delete parent->takeChild(index);
}
QList<QTreeWidgetItem *> selected = ui->twg->selectedItems();
QTreeWidgetItem *item = selected.first();
QTreeWidgetItem *parent = item->parent();
if(parent) {
int index = parent->indexOfChild(item);
delete parent->takeChild(index);
}
To copy to clipboard, switch view to plain text mode
Bookmarks