[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: Key Pressed or Released in keyPressEvent ?
From: Markus Goetz <guruz () gmx ! de>
Date: 1999-08-29 13:47:00
[Download RAW message or body]
Hi
>> The problem is : If the user presses RETURN once but the event is raised twice
>> (i think once for pressed and once for released).
>
>no, the method is called keyPressEvent() - release-events are handled in
>(guess what) keyReleaseEvent(). Dunno what causes the double event. What
>happens if you add e->accept() ?
After posting my message, something like this came in my mind :
void KKeyWordComboBox::keyPressEvent ( QKeyEvent * e )
{
if ((e->key() == Key_Return) || (e->key() == Key_Enter))
{
emit pressedReturn();
} else QComboBox::keyPressEvent (e);
}
And it works !
Markus
>http://www.geocities.com/SiliconValley/1632/
Argh ! Why don't ya get a short url at cjb.net ?
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic