PDA

View Full Version : Panning QGraphicsScene



prashant
28th September 2009, 20:13
Hi,
How do you implement panning of QGraphicsScene by middle mouse dragging? It's like moving the camera in OpenGL. I would prefer to use mouse based panning instead of scrollbars.

Cheers

Prashant

scascio
28th September 2009, 21:41
Hi
You can use QGraphicsView::centerOn or QGraphicsView::fitInView in the view linked to your scene