Get the same result by new API(QGraphicsItem)



  • @
    QGraphicsItem *item3 = createItem( 400);
    //these wouldn't do what I want
    //item3->setTransformOriginPoint(item3->boundingRect().center());
    //item3->setTransform(item3->transform().fromScale(0.5, 0.7), true);
    //this will do want I want to do, 500 and 100 is the scaling center I want(same as boundingRect().center())
    item3->translate( 500, 100 );
    item3->scale( 0.5, 0.7 );
    item3->translate( -500, -100 );
    @


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.