1

This question is regarding Qt's GraphicsViewFramework.

I have two QGraphicsItems of the same type, A and B seen here. I have set both objects to ignore parent transformation,

normal zoom

B is a child of A, so when I move A so does B. and as you see in the picture the position of B is (-300, -300) because that value is relative to it's parent position. But the scenePosition is displaying correctly to (0,0) as expected.

When I zoom in the scene, things get weird. Since B is a child of A, it exists in A's coordinate system so it will maintain it's position relative to A. see picture.

zoomed in

As you can see the position of B in the view seems shifted. I wan't to find the relative position of B in the current zoom level. How can I achieve this?

ArmenB
  • 2,125
  • 3
  • 23
  • 47

0 Answers0