PDA

View Full Version : How can i set the QGraphicsitem's logical coordinates to match the QGraphicsscene Log



wagmare
24th November 2008, 09:52
hi friends/experts,
in a graphics QGraphicsView i am adding an QGraphicsWidget item to the scene and now the item got the painting rect logical coordinates of (0,0,510,510) and also i set coordinates of scene for the same but the coordinates of item rect after adding to the scene now changed comparing to scene coordinates so how can i set the item coordinates to match the scene coordinates...

scene ->QRectF bounds(-330,-330, 540, 540);
painter->drawRect(0, 0, 255, 255);

scene->addItem(paint);
paint->setPos(-255,-255);

i set one icon to setPos(0,0) but the paint coordinates not sync to my scene.....

please help me.....