PDA

View Full Version : How to diagnose why a drop isn't allowed?



eean
16th July 2007, 17:57
I've been strachting my head over an issue for like two weeks now. I have a Model/View, it accepts drops from other widgets. However it does not allow drops from itself. The other widget and itself both use the same subclass of QMimeData, so it really doesn't make sense.

Outside of manually going over all the things that are necessary to enable drag and drop... is there an easier why to find out why I get the (x) cursor when I try to drop on itself?

This is really frustrating, I've looked at the Puzzle example and it seems like I have everything, but I'm apparently missing something.

The code in question is in:
svn://anonsvn.kde.org/home/kde/trunk/extragear/multimedia/amarok/src/playlist

But I'm mostly looking for some technique I can use in general...

Thanks,
Ian

aamer4yu
16th July 2007, 23:09
Have u implemented the dragEnter,dragMove and dragDrop events properly ??

may be somewhere u are rejecting the drops...
if we cud see the code, it wud help to help better :)

eean
17th July 2007, 06:18
Its a Model/View so you don't implement those methods. The code is available at that SVN directory, the relevant parts being in the PlaylistModel.h/cpp and PlaylistView.cpp.