Hello,

I use PyQt4 4.8.4
I subclass QGraphicsPolygonItem with, say, MyGraphicsPolygonItem. In that class
each time i move, insert or delete points , in order to visualize result, i have to write :

Qt Code:
  1. poly = self.polygon()
  2. poly[1]=QPointF(1.0, 2.0)#do my stuff on poly
  3. self.setPolygon(poly)
To copy to clipboard, switch view to plain text mode 
Not very pleasant but... Going a little deeper, i notice this strange behaviour :
Qt Code:
  1. >>> gpol = QGraphicsPolygonItem(.....)
  2. >>> id(gpol.polygon())
  3. 4534170912
  4. >>> gpol.polygon()[6]
  5. PyQt4.QtCore.QPointF(1.0, 1.0)
  6. >>> id(gpol.polygon())
  7. 4534170128
To copy to clipboard, switch view to plain text mode 
...
and so on, id(pol) is very often changing, even when nothing happens to it.
provided id(obj) is supposed to represent memory adress of a Python object, this mean a QGraphicsPolygonItem change in place in memory...????

This does not happen with, for instance, QPointF :
Qt Code:
  1. >>> a = QtCore.QPointF(2,3)
  2. >>> id(a)
  3. 4534171136
  4. >>> a.x()
  5. 2.0
  6. >>> id(a)
  7. 4534171136
  8. >>> a.setY(33)
  9. >>> id(a)
  10. 4534171136
To copy to clipboard, switch view to plain text mode 

Is this a bug ? or a desired feature ?

Thanks for your answer.