[Qt-interest] Using a QRubberBand in a QGraphicsItem
Cole, Derek
dcole at integrity-apps.com
Thu Apr 21 20:58:31 CEST 2011
Hello,
I am trying to use a QRubberBand in a QGraphicsItem. By that, I mean that I want to be able to use the QRubberBand within an individual QGraphicsItem that is in my scene, which naturally would not allow selection of anything outside the bounds of the QGraphicsItem. This is to allow someone to select a portion of an image that is the current focus.
It seems like QRubberBand requires a QWidget to be useable though. I cant seem to figure out a way to cheat here, and make QRubberBand work with QGraphicsItem.
What alternative do I have here? Do I need to try to re-implement rubberband by using some variant of QGraphicsRectItem?
Do I need to create an overridden version of QGraphicsScene?
I am trying to do this on the image as a Ctrl+MousePress event, because currently I am allowing users to pan the individual QGraphicsItems within the scene by using mousepress and release.
Thanks for any tips
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110421/d16fbaa3/attachment.html
More information about the Qt-interest-old
mailing list