Hi!

I have an application where the user can draw any diagram. The diagram area is resizeable. For this I am reimplemented QGraphicsScene and QGraphicsView classes.

1. sceneRect is initially lets sat set to (0, 0, 100, 100) which is smaller than the viewport of QGraphicsView.
2. I draw a resize handler in the function drawForeground in the sceneRect. It appears fine at the right and the bottom edges of the scene in the viewport.
3. I have reimplemented the mouseMoveEvent, mousePressEvent and mouseReleaseEvent of QGraphicsScene such that when the mouse is pressed on the resize handler and dragged the scene is resized by calling setSceneRect.

Now, when the size of the sceneRect becomes more than viewport scrollbar appears but they do not drag along and therefore the size cannot be resized smoothly.

Also, when the scroll bars appear and if we try to reduce the size of the sceneRect using the handlers at the edges, the scrollbars disappear immediately.

Can you someone please help me impelement this the right way?

Thanks,