PDA

View Full Version : QKeyEvent Problem



cutie.monkey
15th July 2008, 01:59
hi there!

I have a compile error using the QKeyEvent..

heres my code:


QKeyEvent *key = new QKeyEvent ( QEvent::KeyPress, Qt::Key_Tab, 0, 0, "Tab");

before, everything works fine. but when i added the <X11/Xlib.h> and <X11/keysym.h> library an error occured.

heres the error:


/root/tskeyboard/src/tskeyboardwidget.cpp:166: error: expected unqualified-id before numeric constant


is there any problem with my code? please help... thnks...:confused:

jacek
25th July 2008, 23:36
Your code is OK. One of X11 headers must define a macro which breaks your code. You can try to move all X11 related code to another .cpp file to separate it from the Qt code.