[Qt-interest] Model/view conditionally accept dropped items
Jugdish
jugdizh at gmail.com
Tue Feb 16 20:00:21 CET 2010
I have a model with items of certain "types" -- let's say type A, B, C, D.
The items of the model are drag/droppable, but I'd like it such that an item
accepts a drop only if the item being dragged is of the same type. So, when
dragging an item of type A, only other type "A" items will accept the drop.
Essentially, the state of each item's Qt::ItemIsDropEnabled flag needs to
dynamically update itself depending on what item is being dragged. What is
the best way to implement such behavior?
Thanks for your help.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100216/d5b61e57/attachment.html
More information about the Qt-interest-old
mailing list