[PyQt] Catching key events Re: [PyQt] Catching key events

Frédéric frederic.mantegazza at gbiloba.org
Mon Jan 19 17:24:31 GMT 2009


On lundi 19 janvier 2009, Mark Summerfield wrote:

> > About keyPressEvent, I'm using it, and it works (thanks to David),
> > except that the repeat sends press followed by release events, and I
> > really need to only get the press event when the key is pressed, and
> > the release one when it is released. I didn't find yet a way to do
> > that. At which level this feature is implemented, so I can try to
> > change it? Should I go down to the event() callback?
>
> I'd stick to reimplementing keyPressEvent. The QKeyEvent parameter can
> tell you if the press is due to autorepeat or a genuine new keyclick.

Got it! It works fine. Thanks :o)

-- 
    Frédéric

    http://www.gbiloba.org



More information about the PyQt mailing list