[Qt-interest] How to move a pixmap around a scene if I've overridden the paint() method?
Samuel Rødal
sroedal at trolltech.com
Wed Nov 4 09:31:06 CET 2009
Topi Hukkanen wrote:
> Hi All,
>
> I'm still having trouble with this.
>
> I've tried everything I can think of, but I still can't get the QPixmap
> to change location in the scene.
> I've had a problem like this before, and I've never been able to solve
> it. I don't know if it's a bug in 4.4.3 or something else...
>
> Any ideas?
>
> -Topi
I see you're calling setTransform(trans) in the paint() function. That
will override the transform that is already set on the painter, meaning
any transformation and position that is set on the item will be ignored.
If you instead do setTransform(trans, true) it will combine your
transform with the painter's current transform.
--
Samuel
More information about the Qt-interest-old
mailing list