[PyQt] QGrahicsView and event issue

Oguz Yarimtepe comp.ogz at gmail.com
Fri Nov 14 15:19:41 GMT 2008


On Thu, 2008-11-13 at 16:53 +0100, dboddie at trolltech.com wrote:
> 
> In your GraphicsView subclass you need to accept only those events
> that
> you handle yourself, so call event.accept() if you receive a key you
> want
> handle and event.ignore() for all other key presses.
> 
> David

Here is the class that i am trying to activate my up and down arrows for
scrolling: http://rafb.net/p/b0d8J673.html

When i remove the Key_Up and Key_Down parts, at my QGraphicsView,
pressing them doesn't make scrolling. I tried to write event.ignore()
after the if event.key() == QtCore.Qt.Key_Down:	 for ex but it didn't
help. What am i missing?



More information about the PyQt mailing list