PDA

View Full Version : Catch drag and drop items



nina1983
22nd July 2008, 13:16
Dear,

There is a way to detect which is the object that is dragged and dropped.
In my specific case I have a QTreeWIdget that allows drag and drop actions only for top level items. I want to be always able to make an ordered list of the top level elements. So if a drag and drop action happened I have to catch it!

I was thinking to reimplement dragEnterEvent ( QDragEnterEvent * ) and dropEvent ( QDropEvent * ). Is it correct? or does exist another way to do that that now I cannot see?

Thanks

Annalisa

P.S let me know if you cannot understand the problem, I'll re-explain it better!

nina1983
23rd July 2008, 17:24
I solved!

I implement a function that verify if a drag and drop action has taken place!
everything seems work....

Bye