Howto handle key-release with autorepeat key
Hi all,
if I press an autorepeat key (like space or a character key) without release the key,
the keyPressEvent and keyReleaseEvent are emitted continuosly until the key is released. So, how can I handle the "true" release of the key??
Any suggestion?
Thanks,
Marco
See this example:
void MyWidget::keyPressEvent(QKeyEvent * event)
{
qDebug() << "press";
...
}
void MyWidget::keyReleaseEvent(QKeyEvent * event)
{
qDebug() << "release";
...
}
<<< I press space key >>>
output will be:
press
release
press
release
press
release
...
<<< I release the space key >>>
release
Re: Howto handle key-release with autorepeat key
Re: Howto handle key-release with autorepeat key
Thanks this solve my problem!
I thought that isAutoRepeat() method was for another purpose.
Bye,
Marco
Quote:
Originally Posted by jacek