How do I show the drop indicator BETWEEN rows, not on them in QTreeView
Hi there,
I'm trying to create a (flat) list that allows items to be dragged into a new order. I'm using QTreeView ( I like how it looks ) with a flat heirarchy and a subclassed QAbstractItemModel. I've gotten drag n' drop reordering of the list to work, but the drop sites that get shown are rectangles that surround the current row/column element that I am over. What I'd like to show is a thick horizontal line drawn BETWEEN the rows where I will drop the selected items.
Can anyone tell me what I need to override, or what setting I need to make, to influence how the drop targets get shown in QTreeView?
Thanks!
Dave
Re: How do I show the drop indicator BETWEEN rows, not on them in QTreeView
1 Attachment(s)
got this answer from Trolltech...
Hi Dave
This is currently a lot harder than it should be. You basically have to
it yourself.
I've shown how you can do this in the attached example. I've also
created a task for the developers about this issue. You can track the
progress of the task here:
http://www.trolltech.com/developer/t...0&method=entry
best regards
Anders Bakken - Support Engineer
--
Trolltech Inc
1 Attachment(s)
Re: How do I show the drop indicator BETWEEN rows, not on them in QTreeView
With wysota's suggestion it would be this simple. Maybe not as pretty though.
Re: How do I show the drop indicator BETWEEN rows, not on them in QTreeView
It looks like the drop indicator is shown for only one column. In my application I need to move whole rows, so I'd like to show drop indicator as wide as the row. Is it possible?