[Qt-interest] Allowing Panning of QGraphicsItem AND Drag/Drop to another QGraphicsView

Cole, Derek dcole at integrity-apps.com
Fri Apr 8 00:10:02 CEST 2011


Hello,

I have subclassed a QGraphicsItem to allow for some custom interaction of these large images I have showing in my QGraphicsView. I wanted to allow for zooming and panning of multiple large images in a fixed size viewport, so I modified the mouseRelease and mousePress events to modify the position of the QGraphicsItem, and I modified the wheelevent to allow a person to zoom in or out on the individual image, instead of the entire scene. 

I want to allow a person to move this QGraphicsItem completely out of the current QGraphicsView and into another one. Would this be accomplished by overriding the dragMoveEvent of the object that I want to move? I am a little unclear on how this is supposed to work. In the destination QGraphicsView do I just have to set it to accept drops, and it will automatically get the image, if I can get the dragging part working?

Thanks

Derek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110407/2c80f2e6/attachment.html 


More information about the Qt-interest-old mailing list