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

Qt-interest Archive, February 2007
QGraphicsView rubber band geometry


Message 1 in thread

Hi !

I develop a simple test application using the Graphics View framework.

I would like to select some QGraphicsItem and fit the view using the
selected items.

To select multiple items I have set the dragMode to
QGraphicsView::RubberBandDrag.

The documentation says:

"A rubber band will appear. Dragging the mouse will set the rubber band
geometry, and all items covered by the rubber band are selected."

I need the rubber band geometry in order to fit the view but I can't find
the way to access it.

A possible solution could find the bounding rect of the selected items, but
also in this case
I cannot find any useful simple method to achieve that.

How I can access to the rubber band geometry ?

Thanks in advance,

Angelo