PDA

View Full Version : QGraphicsPixmapItem repaint immediately



JavaBeta
11th November 2013, 08:00
I use a QGraphicsPixmapItem to hold an image, and a scene holds the item, and a view is attached to the scene. The problem is that when I modify the image and call the item->update(), scene->update(), view->update(), the widget does no change at all. I think it is because the "update" will not immediately call the paint, so does anyone have some solutions?
Thanks!

stampede
11th November 2013, 11:12
If you change the QPixmap object, you will have to call setPixmap() again in order to see the changes in graphics item - QGraphicsPixmapItem doesn't have access to your original pixmap.