PDA

View Full Version : Customize Drag&Drop



wolfi3b
2nd March 2011, 14:15
Hi,
what Im looking for is more some pointing me to some material than exact solution for my problem.
I need to create custom drag and drop efect in my app. Exactly what Im trying to do is that i use tab widget, where each tab is like matrix with some content. I need to drag something from one cell to another which can be on same or diferent tab.
On drag put some custom info related to the place Im draging from to clipboard or somewhere, and on drop I need to use this info to load content to place Im dropping to. So like everything I need to do is like on drag save this info, on drop call this funcion and tel where are you droping.
I searched for some closer info about altering drag and drop this way, but no luck till now. Can you give me some closer directions?

I would apreciate any help.
Thanks

wysota
2nd March 2011, 14:24
What exactly are you having problems with? This looks like a classical drag&drop situation between two line edits (or whatever else you use for representing matrices).

wolfi3b
2nd March 2011, 14:47
Hi thank you for your response,
my problem is, I dont realy understand, how to change it to work it in my way. Like I have my model where is like vector or what ever where are 9 fields( Lets say 9 text strings). I need when i drag from cell, not to put content of cell in the memory, but one of the strings and when I drop, I dont want to put this string to where Im droping, I need to call my own methode on that cell.

wysota
2nd March 2011, 15:32
What exactly do you mean by "change it"? You handle drops by reimplementing dropEvent(), like in the examples.

wolfi3b
9th March 2011, 12:33
Thank you for your efforts, but I was out of net for some time and in the mean time I figured out how to solve it. Still, I realy apreciate your help.

Thank you