[PyQt] QGrahicsView and event issue

dboddie at trolltech.com dboddie at trolltech.com
Thu Nov 13 15:53:58 GMT 2008


On Thursday 13 November 2008, Oguz Yarimtepe wrote:

> I applied what you said and now i am able to get the keyPressEvents. But
> this time i lost the scrolling when i press the arrow up and down.
> Anyway to enable it? I am just able to scroll via mouse scroll now. 

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


More information about the PyQt mailing list