[PyQt] QGrahicsView and event issue

Oguz Yarimtepe comp.ogz at gmail.com
Tue Nov 11 14:43:26 GMT 2008


Hi David,

On Fri, 2008-11-07 at 18:24 +0100, David Boddie wrote:
> In your Main class, you are creating a new instance of a graphics view
> rather than using the one you set up in your pyuic4-created class:
> 
> 29          root.graphicsView=GraphicsView()
> 
> Maybe leave this assignment out.
> 
> David

You were right. I shouldn't create an instance of QGraphicsView. The
main reason i defined that class was to define the event function. It is
said it should be defined at a subclass of QWidget. So how can i
functionate either event function for keyPressEvent for QGraphicsView?

Thanx. 



More information about the PyQt mailing list