QGraphicsTextItem parent is QGraphicsRectItem isn't working properly

Farzana Raisa farzanaahmed17 at gmail.com
Sun Apr 13 12:24:39 PDT 2014


I am trying to draw a rectangle with a text inside. here is my piece of code
QGraphicsRectItem *rectangle=new QGraphicsRectItem(75,50,30,40);
QGraphicsTextItem *text=new QGraphicsTextItem("12.5",rectangle);
scene->addItem(rectangle);
the text isn't in the rectangle. Can anyone help me with this?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20140414/e0b5dc42/attachment.html>


More information about the subsurface mailing list