I have done this as I've been following an example which does this? Is there a better way?!
I'm now trying to subclass QMimeData in order to have my own custom data.
Regards,
Steve
I have done this as I've been following an example which does this? Is there a better way?!
I'm now trying to subclass QMimeData in order to have my own custom data.
Regards,
Steve
Which example does that? I'm pretty sure all drag and drop examples that concern views reimplement mimeTypes(), mimeData() and dropMimeData() from the model.
Hi,
Well the example ( C++ GUI Programming with Qt4) doesn't use a model so I guess this is why it handles the events in the view/widget. I have just implemented the dropMimeData method in my model but it doesn't get called, I guess this is because I have the events implemented in my view?!
Kind regards,
Steve
Yes, it doesn't have the required infrastructure which is already present in views.
Correct. You only need to reimplement the three methods mentioned, even if you want to carry custom data.I have just implemented the dropMimeData method in my model but it doesn't get called, I guess this is because I have the events implemented in my view?!
steg90 (21st May 2007)
Thanks,
I have removed the drag/drop events from my view and implemented the three methods you mentioned into my model, but they don't get called? Do you have to set up the model to accept drops or something?
Regards,
Steve
Bookmarks