PDA

View Full Version : How to identify drag hovered items in itemviews?



happy11wl
1st June 2010, 09:03
I've built a treeview and got the drag&drop function enabled.
The delegate was reimplemented for drawing the treeview.
Then problem comes: how to identify drag hovered item in the treeview and show it in special color by the delegate? Or there are more perfect solutions?
Thank you for answering my question.

aamer4yu
1st June 2010, 11:08
May be you have to look into QAbstractItemView::dragEnterEvent

happy11wl
1st June 2010, 12:08
QAbstractitemView::dragEnterEvent can only get the event pos,but i want to draw something special for the hovered item.