A.H.M. Mahfuzur Rahman
2nd June 2009, 11:22
I am drawing inheriting QGraphicsSvgItem in my class. I have just drawn in the constructor and trying to figure out how to reflect resizing in my drawing.
Which functions should be used so that after resizing it is update in the scene?
The code is below:
Cup::Cup(const QString &fileCup,Board* parent)
: QGraphicsSvgItem(fileCup,parent)
{
//scale(0.5 * parent->boundingRect().width(),0.5*parent->boundingRect().height());
setPos(0,0);
setZValue(1);
}
Which functions should be used so that after resizing it is update in the scene?
The code is below:
Cup::Cup(const QString &fileCup,Board* parent)
: QGraphicsSvgItem(fileCup,parent)
{
//scale(0.5 * parent->boundingRect().width(),0.5*parent->boundingRect().height());
setPos(0,0);
setZValue(1);
}