[Interest] Tree widget: rearrange elements
senseiwa at gmail.com
Wed Aug 29 14:22:39 CEST 2012
On 8/29/12 11:53am, Jan Kundrát wrote:
> That's because root.parent() is an invalid index, and your code
> explicitly rejects such drops. Try changing the else branch to
> explicitly test for indexAt(event->pos()) == root and accept such events.
Cool, now I get root to accept drops! Thanks!
if (indexAt(event->pos()).parent().isValid() ||
indexAt(event->pos()).internalPointer() == root )
> What's the idea behind "reject drops to indexes without a parent"? Looks
> like you're also disabling drops to empty space.
I actually want to disable that, but I couldn't. I tried setting flags
of invisibleRootItem to reject drops, but nada.
More information about the Interest