[Qt-interest] prevent a drop in QTreeWidget
Ross Bencina
rossb-lists at audiomulch.com
Fri May 27 10:14:07 CEST 2011
Graham Labdon wrote:
> How do I get the information that tells me where the item is being dropped
> so I can tell whether or not the drop should be allowed?
Have you looked at the QDropEvent docs?
http://doc.qt.nokia.com/latest/qdropevent.html
QDropEvent::pos() seems like a likely contender.
You might want to use this in conjunction with QTreeWidget::itemAt() for
example.
QAbstractItemView::dropIndicatorPosition () is also interesting.
I guess you've read this:
http://doc.qt.nokia.com/latest/model-view-programming.html#using-drag-and-drop-with-item-views
Ross.
More information about the Qt-interest-old
mailing list