Results 1 to 2 of 2

Thread: QGraphicsView::NoViewportUpdate

  1. #1
    Join Date
    Jan 2008
    Posts
    25
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QGraphicsView::NoViewportUpdate

    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?
    Last edited by Aceman2000; 1st May 2008 at 19:03.

  2. #2
    Join Date
    Jan 2008
    Posts
    25
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QGraphicsView::NoViewportUpdate

    Solved. It is a_qgraphicsview_object->viewport()->update();

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.