In my case GraphicsItem's painter scale means
{
m = painter->matrix();
// draw rect
painter->drawRect(rect);
}
GraphicsItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *)
{
QMatrix m;
m = painter->matrix();
// draw rect
painter->drawRect(rect);
}
To copy to clipboard, switch view to plain text mode
I have checked the matrix (m = painter->matrix()) which is gets reset when I set flag ItemIgnoresTransformations.
You can check painter's scale changes by creating simple applcation with GraphicsView/Scene and adding some rects/ellipse in it. and then zooming for 3 times and then setting ItemIgnoresTransformations flag for all items. You can observe matrix (m) changes.
Can you tell me which events gets send to GraphicsItem when view's matrix get changed.
other than paint(...) ??
Bookmarks