PDA

View Full Version : Drag and drop between QListWidget's



estanisgeyer
21st April 2008, 05:47
Hi friends,

I need guidance to do the drag and drop between two QListWidget designed in the designer. By dragging an item of the first QListWidget for the second, should be checked if this item already exists in this second QListWidget. If it does, it is removed from the first and added the second.

Thanks,

Marcelo Estanislau
Brazil/RS

wysota
21st April 2008, 09:07
What did you already try?

estanisgeyer
21st April 2008, 15:41
Thanks for reply, wisota...

I created a form in the designer with two QListWidget, with the properties to "true" to acceptDrops, dragEnabled, dragDropOverwriteMode and dragDropMode = QAbstractItemView: DragDrop. The big question is whether you do what I just drawing these QListWidget in designer and in writing any code, without having to write a class based on QListWidget and reimplementar functions of drag and drop.

Thanks,

Marcelo Estanislau

wysota
21st April 2008, 16:16
You'll surely have to subclass QListWidget... The default implementation of QListWidget will do something close but not identical to what you want out of the box.

rupeshbhurke
17th February 2011, 05:29
Hi ! I have the same requirement and I am very new to Qt. Can you elaborate on your point

You'll surely have to subclass QListWidget...
and give some more information as to what kind of I will have to write?

Thank you. :)