I try to intercept keyboard events using qwsEventFilter. First of all I must mention that currently I use Qt-creator on X86 Ubuntu and may be this causes problems..

What I did:
myapp.h
Qt Code:
  1. class MyApp : public QApplication
  2. {
  3. public:
  4. MyApp(int &argc, char **argv ) : QApplication( argc, argv ) {};
  5.  
  6. bool qwsEventFilter(QWSEvent * event);
  7. };
To copy to clipboard, switch view to plain text mode 

myapp.cpp
Qt Code:
  1. #include "myapp.h"
  2.  
  3. bool MyApp::qwsEventFilter(QWSEvent *e)
  4. {
  5. if(e->type == QEvent::KeyPress) {
  6. qDebug("pressed");
  7. }
  8. else if (e->type == QEvent::KeyRelease ) {
  9. qDebug("released");
  10. }
  11. return false;
  12. }
To copy to clipboard, switch view to plain text mode 

main.c
Qt Code:
  1. #include <QtGui/QApplication>
  2. #include "myapp.h"
  3. #include "qt-linphone.h"
  4.  
  5. int main(int argc, char *argv[])
  6. {
  7. MyApp a(argc, argv);
  8. Widget w;
  9. w.show();
  10.  
  11. return a.exec();
  12. }
To copy to clipboard, switch view to plain text mode 

if I run the application with -qws and then hit any button on a keyboard I don't see "pressed"/"released". What is wrong with my code? May be Qt creator can handle QWS related code? Anyway I tried to use x11EventFIlter and it didn't even compile because of absence of XEvent definition..