qlands
1st October 2010, 11:05
Hi.
I have an application where a QGraphicsItem (objectA) has the following characteristics:
ScenePos: X=250 Y=125
Transform():
|-----|---|---|
| 2 | 0 | 0 |
| 0 | 1 | 0 |
| 50 | 0 | 1 |
|-----|---|---|
Now, I am creating and new QGraphicsItem (objectB) and setting its scenepos and Transform the same as object A:
objectB = new QGraphicsPolygonItem();
objectB->setPolygon(objectA->polygon());
objectB->setScenePos(objectA->ScenePos);
objectB->setTransform(objectA->transform);
The problem is that objectB appears displaced by 50 units in the X axis.
Any idea why?
I have an application where a QGraphicsItem (objectA) has the following characteristics:
ScenePos: X=250 Y=125
Transform():
|-----|---|---|
| 2 | 0 | 0 |
| 0 | 1 | 0 |
| 50 | 0 | 1 |
|-----|---|---|
Now, I am creating and new QGraphicsItem (objectB) and setting its scenepos and Transform the same as object A:
objectB = new QGraphicsPolygonItem();
objectB->setPolygon(objectA->polygon());
objectB->setScenePos(objectA->ScenePos);
objectB->setTransform(objectA->transform);
The problem is that objectB appears displaced by 50 units in the X axis.
Any idea why?