QGraphicsItemGroup - draw as QPixmap
Hello.
I created my own format for reading/writting objects from scene.
It works fine, but when I try to create QPixmap by using QGraphicsItemGroup
I have some problems.
Code:
... loading data from file....
painter.
setRenderHints(QPainter::Antialiasing);
itemc->paint(&painter, &opt);
}
scene->addPixmap(pixmap);
Below code used to store information:
Code:
ds << path();
QTransform parentTransforms;
if(parentItem())
parentTransforms = parentItem()->transform();
ds << parentTransforms;
ds << transform();
Below code used to load information:
Code:
QTransform parentTransforms;
QTransform transforms;
ds >> path >> parentTransforms >> transforms;
setPath(path);
setTransform(parentTransforms);
setTransform(transforms, true);
Problem: QPainterPath starts drawing from position ...x=420(before drawing moveTo is called)
What kind of informations should I save for QPainterPath, to restore it corectly ?
Thanks, for reply.
Re: QGraphicsItemGroup - draw as QPixmap