[Kde-games-devel] QGraphicsView and fitInView

Wolfgang Rohdewald wolfgang at rohdewald.de
Sat Feb 21 08:47:40 CET 2009


On Samstag, 21. Februar 2009, Pierre Maurier wrote:
> I have made some tests and I have found that if I call 
> 
> self.gameView.fitInView(self.gameView.scene().itemsBoundingRect(), 
> Qt.KeepAspectRatio)
> 
> in __init__ it don't works
> 
> but if I call it later (with a QTimer for exemple) it works !

that is why I put it into resizeEvent - which is also called
at init time

-- 
Wolfgang


More information about the kde-games-devel mailing list