I don't think the items know id they are scaled or not. And if they do, that way madness lies (for me anyway). Rather what I think you need is an item with an overlay functionality. You basically have a widget (Item) stack simultaneously display multiple indexes. When you scale, you only scale the lower item. You keep the top the same. When you move it, then it will move all stacked items at the same time. (I am imagining something like a watermark feature) By subclassing QGraphicsItem, you can control what transforms are applied to the top (overlay) item, as well as the underlying items.
----- Original Message ---- From: Hans-Peter Jansen <[email protected]> To: [email protected] Sent: Wed, February 9, 2011 4:09:01 PM Subject: Re: [PyQt] explanatory label in a not uniformly scaled QGraphicsView On Wednesday 09 February 2011, 15:06:24 KONTRA, Gergely wrote: > Hi all! > > Is there a way to place a text on a QGraphicsView, which always looks > the same size (say 10px) on screen, regardless of the scaling applied > to the View? Gergo, this is exactly a case, where studying the Qt source is most helpful. Probably you can just subclass and reimplement the object of your liking, that doesn't apply the scaling in the paint event... Pete _______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt ____________________________________________________________________________________ Food fight? Enjoy some healthy debate in the Yahoo! Answers Food & Drink Q&A. http://answers.yahoo.com/dir/?link=list&sid=396545367 _______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
