Hi,
I want to resize a QGraphicsItem which r placed on to scene in runtime, I want the user to resize the Item after placing it on the scene. So what are methods or wat is the process for getting it.
with regards,
Hi,
I want to resize a QGraphicsItem which r placed on to scene in runtime, I want the user to resize the Item after placing it on the scene. So what are methods or wat is the process for getting it.
with regards,
Hi,
there is metod for scaling one item
void QGraphicsItem::scale ( qreal sx, qreal sy )
or if you want to scale whole scene then
void QGraphicsView::scale ( qreal sx, qreal sy )
radek.z
But I want to resize it with drag event. i want to give user the option to resize. for example there is a line with default size then if user want to resize it then user need to click on line item so that item is ready for draging and user need to drag the ending or starting point to a particular position then the line should scale upto the mouse position.
thanks for replying.
U need to handle mouseMoveEvent() to resize ur item. In addition u need to write your own resizeItem() method which will be called from mouseMoveEvent().
And you need to place all your logic of resizing an item in the resizeItem() method.
Regards,
~Sanjay
Bookmarks