The code behaves correctly (pos() of subitem is (0,0) and the item is not scaled so its coordinate system is identical to that of its parent , apart from the call to setPos() from within paint() which is of course invalid and causes things to work differently after the item is painted compared to before the item is painted. You also don't need to call prepareGeometryChange() in item constructor.
Bookmarks