[Qt-interest] Fwd: Mirrored QGraphicsView
Amit Kumar Sharma
qtbond007 at gmail.com
Tue Jul 28 12:13:01 CEST 2009
Forgot to fwd to list.
---------- Forwarded message ----------
From: Amit Kumar Sharma <qtbond007 at gmail.com>
Date: Tue, Jul 28, 2009 at 3:41 PM
Subject: Re: [Qt-interest] Mirrored QGraphicsView
To: Oliver Demetz <forenbeitraege at oliverdemetz.de>
Hello Oliver,
You should try QTransform.
QTransform viewTransform = view->transform();
viewTransform.rotate(180, Qt::XAxis);
view->setTransform(viewTransform);
I hope it works.
I assume you have two views associated to same scene.
On Tue, Jul 28, 2009 at 3:10 PM, Oliver
Demetz<forenbeitraege at oliverdemetz.de> wrote:
> Hi,
>
> in principle this should be not a problem,
> but I was wondering how to set the display
> mode of a QGraphicsView to be *mirrored*?
>
> Mirrored for me means to either flip the
> displayed contents horizontically or vertically.
> This would conincide with a 180-degree-rotation
> around the y-axis or the x-axis, respectively.
>
> I cannot find a direct switch in the docs to
> realise this goal, and the QMatrix class represents
> a 3x3 matrix, not a 4x4 one which would be needed
> to rotate as described.
>
> Thanks for your hints in advance,
> Oliver
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
--
cheers,
AK
--
cheers,
AK
More information about the Qt-interest-old
mailing list