Results 1 to 7 of 7

Thread: how to catch key combination inside keyPressEvent.

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: how to catch key combination inside keyPressEvent.

    As I said, you can do it with the numpad only. And you will have to change the if-statement because Qt::KeypadModifier will be active as well:
    Qt Code:
    1. if (event->modifiers() & Qt::ShiftModifier)
    2. ...
    To copy to clipboard, switch view to plain text mode 
    J-P Nurmi

  2. The following 2 users say thank you to jpn for this useful post:

    babu198649 (13th May 2008), spagatoni (14th July 2009)

  3. #2
    Join Date
    Nov 2007
    Posts
    291
    Thanks
    85
    Thanked 1 Time in 1 Post

    Default Re: how to catch key combination inside keyPressEvent.

    thanks jpn it works,
    is there any advantage in using bitwise AND operator in preference to == operator(although both works). How does the bitwise AND operator works here(ie. logic ) .

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.