Hi,
I have a QTreeWidget that is represented like this:
Column0 Column1
Item1
Item2
|-------------SubItem1 [Button1]
|-------------SubItem2 [Button2]
Internally I have a data structure that contains the same data.
Now, I use a method that let's me move SubItem1 and SubItem2 up or down internally in my structure data. When I finish the internal data moving I want to move the items of the QTreeWidget.
So what I am doing now is to take all the subItems into a QList<QTreeWidgetItem*> and then I reinsert them as Item2 childs following the internal data structure. This works well but there is a problem, all the Widgets that the SubItems have are lost. So the Button1 and Button2 have dissapeared and only the text of the buttons are displayed.
Is there any other way to do this? Or how can I solve this problem?
Thanks,
Bookmarks