PDA

View Full Version : QlistWidget Missing signal for Drop action



papitou38
7th March 2009, 23:10
Hi "bonjour"
I went to know if its possible to be informed when an item is added by drag&drop action in a QlisWidget.
To explain my need :
I have two QlisWidget. The first one contain a list of simple strings. The user can drag & drop from this list to the second items.
Problem is that with the standard behaviour of QlisWidget I can have duplicate items in my second list.
One functional solution could be : a drag&move behaviour (but i don't know how to code this.
other one is to have a signal after the drop and i will then remove the duplicate item

Last information :
I am using Qt creator with ui and I don't went to have my own QlisWidget class.

So is-it possible and how
Thanks all of you in advance ;-)

aamer4yu
8th March 2009, 16:48
You will need to override QAbstractItemView::startDrag
and set the option to Qt::MoveAction. I guess you can try and check...