Position in itemChange
-
Virtual function in QGraphicsItem interface
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;strangely provides
valuethat either in scene or local coordinates. Maybe anyone has idea why?Problem description: At first, when all graphics items get shown,
valuealways is in scene coordinate. Moving any item works fine. Then, after move is completed, the next move makesvalueto be in local coordinate. Visually it appears as sudden jump to the origin (0,0). -
@SGaist Thanks for reply. Yes, like that. I suspect some initialization state on scene/view/items, because after
valueswitches to local item coordinates, it says in local coordinates all the time.PS. There is more logic in
itemChangein fact, but it all commented out to localize the problem. -
@SGaist Thanks for reply. Yes, like that. I suspect some initialization state on scene/view/items, because after
valueswitches to local item coordinates, it says in local coordinates all the time.PS. There is more logic in
itemChangein fact, but it all commented out to localize the problem.