[PyQt] QGraphicsItem absolute position

Attila Csipa pyqt at csipa.in.rs
Mon Jul 13 16:27:28 BST 2009


On Monday 13 July 2009 16:41:21 TheLonelyStar wrote:
> I have a QGraphicsScene to which I add QGraphicsItems using
							^^^^^
>
> newItem=QtGui.QGraphicsEllipseItem(event.scenePos().x()-10,event.scenePos()
>.y()-10,20,20)

Are you sure you added the item ? You *created* it but from the code you can't 
see that it has been actually *added* to the scene, and until you do that, 
the null parent/scene means a pos of (0,0) if I understand correctly.



More information about the PyQt mailing list