[PyQt] QMatrix transformations in QGraphicsView
scorp1us at yahoo.com
Mon Jul 13 14:46:09 BST 2009
Well, with the upcoming animation classes, (which I am still looking for help with)
You'd best make a small proxy class/API to handle the things that would transform its matrix. Ideally, you would expose these as properties for use with QPropertyAnimation. The proxy class holds all the component vlaues (x,y,z) rotations/scales, etc.then simply calls item->setTransform(QTransform().rotate(xRot, Qt::XAxis).rotate()....) after each property update.
What I then do is PropertyProxy proxy(item);
proxy->setXRotation(45); etc., and don't worry about modifying the item.
----- Original Message ----
From: Luca Fasano <lucafasano at interfree.it>
To: pyqt at riverbankcomputing.com
Sent: Monday, July 13, 2009 9:22:36 AM
Subject: [PyQt] QMatrix transformations in QGraphicsView
is there any Qt Signal or event handler to handle QGraphicsView
transformations which modify its QMatrix (for example scalings,
Until now I overrided standard QGraphisView transformation methods (i.e.
scale(), rotate(), ...) and emitted custom signals in these methods.
But I don't think this is the better way to solve the problem.
I'm using PyQt.
PyQt mailing list PyQt at riverbankcomputing.com
More information about the PyQt