----- Original Message ----
> From: Eskil Abrahamsen Blomfeldt <[email protected]>
> To: ext Mihail Naydenov <[email protected]>
> Cc: "[email protected]" <[email protected]>
> Sent: Fri, October 30, 2009 10:32:36 AM
> Subject: Re: [Qt4-preview-feedback] ItemChange for setScale and setRotation
>
> ext Mihail Naydenov skrev:
> > Right now neither of these trigger itemChange().
> >
> > Is this "normal"?
> >
> >
>
> This is a behavioral change which was required for some optimizations in
> QGraphicsView. From changes-4.6.0:
>
> "d) QGraphicsItem no longer calls itemChange() for position and
> transformation
> changes. If you want to receive notifications for changes to the item's
> position
> and transformation, you can set the flag
> QGraphicsItem::ItemSendsGeometryChanges
> (which is enabled by default by QGraphicsWidget and QGraphicsProxyWidget)."
Actually, no, this is not the case. ItemSendsGeometryChanges is only to
re-enable ItemTransformChange.
This is however not related to setScale and setRotation, these two are new,
on-top of transform()-s.
In other words ItemSendsGeometryChanges activates change report only for
setGeometry(), but setScale and setRotation do not call setGeometry()
internaly,
they sit ontop of it:
"QGraphicsItem always applies the properties in a fixed, defined order:
* The item's base transform is applied (transform())
* The item's transformations list is applied in order (transformations())
* The item is rotated relative to its transform origin point (rotation(),
transformOriginPoint())
* The item is scaled relative to its transform origin point (scale(),
transformOriginPoint())"
(Yes, graphics item just got more complicated :)
MihailNaydenov
>
> -- Eskil
_______________________________________________
Qt4-preview-feedback mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt4-preview-feedback