PDA

View Full Version : Qt Drag and Drop Snap



seano182
31st March 2011, 04:18
Hey guys,

Was just curious if anyone has tried a drag and drop GUI in which shapes dragged into a particular area snap to the base of one another.

Have looked around and can only find simple drag and drop graphics. I'm after getting several blocks attached to one another and obtaining some strings attatched to each object in a ordered grouping fashion.

Any help would be appreciated.

Thanks

Sean

wysota
31st March 2011, 10:39
Was just curious if anyone has tried a drag and drop GUI in which shapes dragged into a particular area snap to the base of one another.
Yes.

Any help would be appreciated.

"Qt in Education" section of Qt/Nokia website contains a lecture on Graphics View with a lab (jigsaw puzzle) that handles such a thing. It doesn't use drag&drop per se but rather the item moving mechanism built into graphics view. But the idea is the same regardless of what mechanism you use.

seano182
31st March 2011, 11:52
Thanks for that, I'll have a look into it.