Results 1 to 2 of 2

Thread: How to identify Num pad keys

  1. #1
    Join Date
    Jul 2007
    Posts
    90
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default How to identify Num pad keys

    Hi,

    I want to display the key press values in human readable format in QLineEdit.

    like Ctrl + Alt + D, Alt + F .

    I have written KeyPressEvent() and in which i am doing this stuff. its working.

    But it doesnt work with Number pad.

    So how i can identify the number pad keys in my keyPressEvent() so that i will be able to show it in my QLineEdit.

    e.g Ctrl + Num 1 if NUM_LOCK is on
    Ctrl + End if NUM_LOCK is off.

    Thanks in advance.

    Regards,
    ~Sanjay

  2. #2
    Join Date
    May 2008
    Location
    Kyiv, Ukraine
    Posts
    418
    Thanks
    1
    Thanked 29 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: How to identify Num pad keys

    You have to use a Keyboard modifier. There is Qt::KeypadModifier, which is the one you are looking for. (I guess).
    I'm a rebel in the S.D.G.

Similar Threads

  1. How to get list of database's table's foreign keys?
    By jambrek in forum Qt Programming
    Replies: 3
    Last Post: 26th September 2008, 05:50
  2. how to Identify which QLable clicked
    By rajeshs in forum Qt Programming
    Replies: 1
    Last Post: 5th June 2008, 12:11
  3. Nullable foreign keys in QTableView
    By Banjo in forum Newbie
    Replies: 3
    Last Post: 31st January 2008, 22:07
  4. How to identify the process
    By vishesh in forum Qt Programming
    Replies: 1
    Last Post: 28th April 2007, 16:18
  5. Handling of dead keys in keyPressEvent()
    By ghorwin in forum Qt Programming
    Replies: 4
    Last Post: 2nd December 2006, 12:26

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.