I've installed an eventFilter to capture key presses without problem, but I need to cast the passed event object in my eventFilter() method to the correct type before I can actually do anything useful.
In C++ its simple (eg):
QKeyEvent *k = (QKeyEvent *)e;
How can I do this with PQt?
As ever, thanks for your help.
since 3.004 you can :
CAST $e, "Qt::KeyEvent";
But beware : it changes directly the $e object and doesn't do any kind of checking...
Thanks Germain, works perfectly.
> and doesn't do any kind of checking...
Sounds just like my code :)
Log in to post a comment.