Delayed Update for drawn objects from QGraphicsScene? QPainter objects have no problem.
-
I've used both QPainter->drawXXXX() and QGraphicsScene->addXXXX() in my code, the reason is only QPainter->drawText() won't move and scale after I change the window size and I need that. The QGraphicsItem::ItemIgnoresTransformations for the text that's created from QGraphicsScene->addText() is not fully working, it moves still.
When I call update(), the QPainter objects got updated right away, but QGraphicsScene doesn't update until I move my mouse out of the window. I tried calling processEvent(), but it's not helping.Any help is appreciated!
-
Hi,
Something is not clear from your description, are you re-implementing QGraphicsTextItem ?
-
No, I didn't re-implementing QGraphicsTextItem. I didn't even use it for drawing text, because it's moving when I change the window even with itemIgnoreTransformations flag. So I use QPainter->drawText() for showing text.
Then I've found out that, QPainter's text got updated right away when I call update(), but whatever objects I've drawn from QGraphicsScene->addXXXX() doesn't get updated until I make move of the mouse out of window or click the view.