PDA

View Full Version : How do I clear the rubber band after a selection is done



aarelovich
14th July 2010, 21:37
Hi:

I making a plotting widget using QGraphicsView Framework and I wanted to add the zooming functionality. I can set the rubberband and get the selected scene area by using the selectedArea().boundingRect() function. However I cannot get the selection square (the one created by the mouse motion) to go away. Even if i call clearSelection() the square remains there. How should I get rid of it?

Thanks for any help.

aarelovich
15th July 2010, 13:29
So I found the answer: the box clears on mouse release but since I was reimplementing mouseRelease I forgot to send the event to it's parent (QGraphicsView::mouseReleaseEvent()). That is all problem solved!