PDA

View Full Version : keyrelease problem in qt



kinjalp
10th February 2012, 07:10
Hi all,

from where the event filter is called in qt ???? is it in constructor of application or in key press event or key release event.??? :confused:

I had given two separate functions to key press of N and key release of N...

But when I continuously press N then also release function is called.It means it take key release event but I had not release the key N.

I also try to give sleep command in between key press and key release But it can not work...

Regards,
Kinjal.

ChrisW67
10th February 2012, 07:19
Event filters are installed on which ever QObject you install them on, and called whenever an event destined for that QObject is received.

kinjalp
10th February 2012, 11:30
Thanks for reply .....

It works using

if(e->isAutorepeat())
{

e->ignore();
}
in key release function.