PDA

View Full Version : Unable to properly implement a QRubberBand



jamadagni
8th April 2009, 12:14
Hello. I am using PyQt, I hope that doesn't mean I can't ask questions here.

I have attached a small program, and I expect it to draw a rubberband on a QLabel. However, apparently everytime the MouseMoveEvent is processed, the origin of the rubberband is reset to the current event position therefore I am unable to succesfully achieve a proper rubberband.

Please help. Thanks in advance.

jamadagni
8th April 2009, 13:39
Well I searched yet again and found the workaround at this old thread (http://www.qtcentre.org/forum/p-qrubberband-doesnt-show-x11linux-post84287/postcount3.html). Thanks to Jacek. I am thinking of raising this issue on the Python-Qt4 mailing list. I am now attaching the working version just for reference's sake.