Hi.
I have a QGraphicsScene with items. I have a different view depending on which 'button item' is pressed on the scene. So the view changes if an icon button is pressed.
Example : Scene view #1 has buttons and items.
Buttons:
The buttons are created from a class of it's own, call it class::button, inherits QGraphicsRectItem. This class re-implements the virtual paint function, and the buttons are painted. In this class the painting of the buttons are done, and mouse events are captured when the buttons are pressed.
Items:
The item is a polygon with a radial gradient. This is a class:: polygonitem, inherits QGraphicsPolygonItem. This class re-implements the virtual paint function, and the polygon is painted.
Problem:
When I press a button/icon on a scene, the button paint function updates the button (due to the event that causes the button to expand and retract. The button class mouse event calls 'update()' to update the button. When the update function is called, it also causes my polygon item to update. The paint function in the polygon class is also called for an update.
This functionality will slow down the button presses. I do not need the polygon repainted everytime the button is pressed. I know it's probably related to how I implemented the classes and painting. Ideas? When I call 'update()' only the button item is updated?
Thank you