[Interest] Tree widget: rearrange elements
senseiwa at gmail.com
Wed Aug 29 09:57:06 CEST 2012
On 8/27/12 12:37pm, Tibold Kandrai wrote:
> Nice catch!
> Set the flag since that you have to do that only when creating the item
> and I guess Qt internally it will check the flag anyway.
Having succeeded in this, now I'm facing a new challenge: limit the drop
to a tree.
I have a root in the tree, and every item is a child of that. If I
drag/drop items, I can rearrange things.
Except that no item should be dropped at the same level of root.
| +- a.txt
| +- b.txt
I hoped that having a valid parent could be OK, and if I use this
method, I can drop to children of root:
void txProjectView::dragMoveEvent(QDragMoveEvent *event)
Unfortunately, I cannot drop on root!
I am missing something really stupid here...
Thanks & Cheers!
More information about the Interest