paulz
19th November 2009, 18:19
Hi,
I add many QPixmaps to my QGraphicsScene after I show my dialog with the QGraphicsView in it.
I set the scene on the graphics view in the constructor and add the pixmaps at a button press at a later time...
This seems to redraw the graphics view ok, but the graphics view scroll bars just "appear" when I put the mouse over the graphics view like they have only just been forced to draw? This happens even if i call repaint() on graphics view.
And if i set scrollbars to always be on then they still do not seem to draw as the size changes when I put mouse over it.
Edit: This can be closed now, I solved the problem :)
The problem was that I did not call setSceneRect()
I add many QPixmaps to my QGraphicsScene after I show my dialog with the QGraphicsView in it.
I set the scene on the graphics view in the constructor and add the pixmaps at a button press at a later time...
This seems to redraw the graphics view ok, but the graphics view scroll bars just "appear" when I put the mouse over the graphics view like they have only just been forced to draw? This happens even if i call repaint() on graphics view.
And if i set scrollbars to always be on then they still do not seem to draw as the size changes when I put mouse over it.
Edit: This can be closed now, I solved the problem :)
The problem was that I did not call setSceneRect()