Dear,
I'm new with Qt, it's one day that I'm trying to solve this problem...
I want to be able to drag and drop elements inside my QTreeWidget but I want that the hierarchy is respected... here an example:
tree->setAcceptDrops(true);
tree->setDragEnabled(true);
QTreeWidget* tree = new QTreeWidget(QDialog);
tree->setAcceptDrops(true);
tree->setDragEnabled(true);
tree->setDragDropMode(QAbstractItemView::InternalMove);
QTreeWidgetItem* dad = new QTreeWidgetItem(tree,0);
QTreeWidgetItem* child = new QTreeWidgetItem(dad,0);
To copy to clipboard, switch view to plain text mode
I want to be able to drag and drop only "dad" elements (with its childs attahced obviously) at the same level as the other "dad" elements...
I hope you can understand my problem... if not please let me know and I'll try to explain it better!
Thank you very much
Lisa
Bookmarks