[SOLVED]how to update the polygon point of a custom QGraphicsPolygonItem?
-
i want to update the polygon point of a custom QGraphicsPolygonItem, i got the point from the m_Polygon, and change its value, then i use the API setPolygon() again...
my it's the same m_Polygon, and i just changed some point value in it, and is there any update() kinda API to do this? -
You changed a copy of the polygon. You need to set the polygon for the update to happen. If you need anything else, you will have to write a custom GraphicsItem.
-
There is no other way I know of. If you want more efficiency, you would probably have to write your own specialized item.