Hi,
thank you for the reply.
but i want to grow the size of an item from origin to (x,y) without motion of item.
Hi,
thank you for the reply.
but i want to grow the size of an item from origin to (x,y) without motion of item.
HI Lykurg,
I got that by QGraphicsItem::setTransformOriginPoint().
thanks.
ram
i have got the same issue.
i used function which you specified in the following way but it gives me no result.
selectionItem->QGraphicsItem::setTransformOriginPoint (1000.0, 1000.0);
could you please help me with this issue.
thanks
What result do you expect and what do you get? And what is the size of selectionItem?
expected result is to have zoomin effect i.e, selected item should grow from origin to (x,y) which in my case(100,100).
result of this does not give zoomin effect. i.e, selected item does not grow in size.
size of my selected item is this:
RectItem *selectionItem = new RectItem(QRectF(-225, -225, 450, 450),Qt::white, pad);
selectionItem->setTransformOriginPoint (100.0, 100.0);
this is what i have done.
expecting your review.
Last edited by rashmi; 12th November 2010 at 12:22. Reason: updated contents
I'm no expert, but from what I gather transform should move you object from one point to another.
setScale should allow your object to grow.
If you look at QGraphicsItem::setScale ( qreal factor ) you will see that it says there that it will scale at 0,0 but if you want it to scale at another point you need to use setTransformOriginPoint()
Bookmarks