Results 1 to 2 of 2

Thread: QKeyEvent Problem

  1. #1
    Join Date
    Jul 2008
    Location
    Philippines
    Posts
    60
    Thanks
    9
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question QKeyEvent Problem

    hi there!

    I have a compile error using the QKeyEvent..

    heres my code:

    Qt Code:
    1. QKeyEvent *key = new QKeyEvent ( QEvent::KeyPress, Qt::Key_Tab, 0, 0, "Tab");
    To copy to clipboard, switch view to plain text mode 

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

    heres the error:

    Qt Code:
    1. /root/tskeyboard/src/tskeyboardwidget.cpp:166: error: expected unqualified-id before numeric constant
    To copy to clipboard, switch view to plain text mode 

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

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QKeyEvent Problem

    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.

Similar Threads

  1. problem with paint and erase in frame
    By M.A.M in forum Qt Programming
    Replies: 9
    Last Post: 4th May 2008, 20:17
  2. Tricky problem with ARGB widget / UpdateLayeredWindow
    By nooky59 in forum Qt Programming
    Replies: 3
    Last Post: 21st February 2008, 10:35
  3. Graphics view display problem.
    By kiranraj in forum Qt Programming
    Replies: 3
    Last Post: 20th July 2007, 07:08
  4. fftw problem
    By lordy in forum General Programming
    Replies: 1
    Last Post: 16th March 2006, 21:36
  5. Replies: 16
    Last Post: 7th March 2006, 15:57

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.