PDA

View Full Version : QGraphicsView::NoViewportUpdate



Aceman2000
1st May 2008, 14:28
Hi,

I have a QGraphicsscene with many small pixmaps. I'd like to scroll them while keeping the sceneRect intact. What I do is to move them to the right by one pixel, but this is very slow. I thought that would be a better solution if I disabled the viewport update of QGraphicsView, and do an update manually after I had moved all of the pixmaps. However, disabling automatic updates causes my scene to remain all white (this is expected), and I can't find a way to update the viewport. I've tried QWidget::update, QGraphicsView::updateScene, QGraphicsView::invalidateScene, etc. How should I do this?

Aceman2000
4th May 2008, 18:54
Solved. It is a_qgraphicsview_object->viewport()->update();