I'd like to have each rect item on the scene, with the local (0,0) coordinate in the centre of the rect.

If i'd like to obtain a rect item with this attribute, a write:
Qt Code:
  1. QRectF area(-25,-25,50,50)
  2. myrect = new rectitem(bla,bla,area);
  3. setPos("pos in the scene where i'd like to put my item")
To copy to clipboard, switch view to plain text mode 

I build the rect in this mode: QRectF area(-width/2,-height/2,width,height);

The problems come, when i resize the rect.
When i resize it, i use the setRect() function, where i set the new rect.
At the end of resize, the local coordinate (0,0) doesn't match with the centre of my item. How can i obtain this behaviour??