nilot
27th September 2016, 13:49
Hello,
In my QGraphicsScene I have a QGraphicsItem ( the red rectangle) and a QGraphicsLineItem. I can also change the scale of the view but my QGraphicsLineItem ignores the scale changes : to achieve that I used the following line of code:
myQGraphicsLineItem->setScale(1.0/scaleOfView);
So the two items don't have the same scale.
Unfortunately when the scale of the view changes, the relative position of my two items changes ( see the two captures) even if the scene positions of the two items remain the same . Do you understand why ?
1212612127
Thank you
In my QGraphicsScene I have a QGraphicsItem ( the red rectangle) and a QGraphicsLineItem. I can also change the scale of the view but my QGraphicsLineItem ignores the scale changes : to achieve that I used the following line of code:
myQGraphicsLineItem->setScale(1.0/scaleOfView);
So the two items don't have the same scale.
Unfortunately when the scale of the view changes, the relative position of my two items changes ( see the two captures) even if the scene positions of the two items remain the same . Do you understand why ?
1212612127
Thank you