repaint() does not work on all platforms. You can only paint to a widget (including to an item in a scene rendered by a QGraphicsView widget) during a paint event.
I don't understand your original problem though. Why would you want to paint an item immediately after painting it? The user would not be able to see the first paint because it would happen so fast. Why not just paint the item once? In your mouseReleaseEvent() you can set an appropriate state on the item and call update(). Then in paintEvent() drw the item according to the state you set.
That's what I did but the paintEvent() is not processed until I put a window on top of my application window and show it again.
Bookmarks