Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 4

Qt-interest Archive, January 2007
QGraphicsView::RubberBand drag mode issue


Message 1 in thread

I want to be able to let the user select a group of items with the built-in
rubber band functionality, but I'm still interested in mouse
press/move/release events.  But it seems that once I set the drag mode in my
QGraphicsView to RubberBand it supresses the mousepress event, the mousemove
events while the rubberband is being drawn and the mouse release event.  Is
there a way to get those events or am I listening to the wrong events?

Message 2 in thread

Chris Thatcher wrote:
> I want to be able to let the user select a group of items with the
> built-in rubber band functionality, but I'm still interested in mouse
> press/move/release events.  But it seems that once I set the drag mode in
> my QGraphicsView to RubberBand it supresses the mousepress event, the
> mousemove
> events while the rubberband is being drawn and the mouse release event. 
> Is there a way to get those events or am I listening to the wrong events?

You can subclass the view, and reimplement mouseMoveEvent(). The rubber band
does indeed eat its own mouse events.

Andreas

-- 
 [ signature omitted ]