PDA

View Full Version : QGraphicsItem tranformation problem.



nightroad
15th September 2011, 08:38
Hello there,

i have a problem with QGraphicsItem tranformation there is a link what i expect and what is happening http://i52.tinypic.com/mvn5gz.png, and here is the code ;

//origin point is center of item
QTransform newTransform = QTransform().translate( origin.x(), origin.y() ).scale( 2, 1 )
.translate( -origin.x(), -origin.y() );
setTransform( newTransform, true);

//origin point could be change here but for now same center of item.
newTransform = QTransform().translate( origin.x(), origin.y() ).rotate( 90 )
.translate( -origin.x(), -origin.y() );
setTransform(newTransform, true); , could you help me figured out the problem , thanks