No, not really. The only thing I can think of is to take ownership of the widget, too, e.g:
QWidget* widget
= tree
->itemWidget
(index,
0);
widget->setParent(this);
tree->insertTopLevelItem( newindex, tree->takeTopLevelItem( index ) );
tree->setItemWidget(newindex, 0, widget);
QWidget* widget = tree->itemWidget(index, 0);
widget->setParent(this);
tree->insertTopLevelItem( newindex, tree->takeTopLevelItem( index ) );
tree->setItemWidget(newindex, 0, widget);
To copy to clipboard, switch view to plain text mode
Bookmarks