PDA

View Full Version : Reshape graphic items



jsmith
30th July 2009, 19:13
Hi,
I have graphic items on graphics scene and i can drag and drop.now i want to reshape that graphics items and again have to drag and drop. Please tell me how to reshape that items.
Thanks in advance

aamer4yu
31st July 2009, 05:39
Maintain some shape, and use that to draw in boundingRect() or shape() .
So when you need to change shape, you can easily update the member variable

jsmith
31st July 2009, 06:57
Thanks for yours quick reply. I think u misunderstood my problem

my problem is suppose i have one circle. now i have to change it as a ellipse or some other shape by drag control points. How to develop this shape change.

navi1084
31st July 2009, 07:46
inherit QGraphicsItem and override paint() event. In paint() draw as you want.... :)