Hello,
I've installed an event filter in my app, and I'm trying to catch key events.
my code looks like this:
{
if( dynamic_cast<QKeyEvent*>(pEvent) )
{
OutputDebugString( L"key\n" );
}
}
bool MyClass::eventFilter( QObject* pWindow, QEvent* pEvent )
{
if( dynamic_cast<QKeyEvent*>(pEvent) )
{
OutputDebugString( L"key\n" );
}
}
To copy to clipboard, switch view to plain text mode
When I hold down a key, I get several events. They stop when I release the key. That is what I want, so that's good.
However when I hold down the alt key, I don't get multiple events when holding down the key. I only get one or two QKeyEvents.
Does anyone know why?
Bookmarks