Alundra
7th February 2015, 05:12
Hi all,
When drag and drop in a QTreeWidget the selection is lost, same for a move to root like that :
ParentItem->treeWidget()->addTopLevelItem( ParentItem->takeChild( ParentItem->indexOfChild( Item ) ) );
The selection is lost using addChild too :
ParentItem->addChild( Item->treeWidget()->takeTopLevelItem( Item->treeWidget()->indexOfTopLevelItem( Item ) ) );
Does I have to disable event of selectionChanged and reselect manually which is a hack or Qt has something to solve the problem ?
Thanks for the help
When drag and drop in a QTreeWidget the selection is lost, same for a move to root like that :
ParentItem->treeWidget()->addTopLevelItem( ParentItem->takeChild( ParentItem->indexOfChild( Item ) ) );
The selection is lost using addChild too :
ParentItem->addChild( Item->treeWidget()->takeTopLevelItem( Item->treeWidget()->indexOfTopLevelItem( Item ) ) );
Does I have to disable event of selectionChanged and reselect manually which is a hack or Qt has something to solve the problem ?
Thanks for the help