Results 1 to 2 of 2

Thread: shortcut key problem in Qpushbutton

  1. #1
    Join Date
    Aug 2009
    Location
    coimbatore,India
    Posts
    314
    Thanks
    37
    Thanked 47 Times in 43 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default shortcut key problem in Qpushbutton

    hi,
    im working in qt4.5 ,debian
    i'm having a list of QPushButtons as menu
    and i hav given numbers as shortcuts
    ex 0 for btn_a
    1 for btn_b
    2 for btn_c

    its working well when i press one key at a time.
    but , when 2 keys are pressed in the same time ,
    both of the buttons get called.
    is there any way to avoid this? [the second button click]

    Thnks
    Bala

  2. #2
    Join Date
    Sep 2009
    Posts
    72
    Thanked 10 Times in 10 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded Qt Jambi
    Platforms
    Unix/X11 Windows

    Default Re: shortcut key problem in Qpushbutton

    Hi

    Please go thru QKeySequence class documentation.

    You might need to add even filter QKeyEvent to avoid this.

Similar Threads

  1. QSS problem on a QPushButton
    By ber0y in forum Newbie
    Replies: 6
    Last Post: 21st July 2009, 07:56
  2. QPushButton loses shortcut
    By Cruz in forum Qt Programming
    Replies: 1
    Last Post: 22nd February 2009, 06:21
  3. shortcut problem on OSX
    By stefkeB in forum Qt Programming
    Replies: 0
    Last Post: 8th December 2008, 10:11
  4. Shortcut Context Problem
    By dvmorris in forum Qt Programming
    Replies: 4
    Last Post: 10th July 2007, 22:39
  5. Strange shortcut problem
    By blukske in forum Qt Programming
    Replies: 0
    Last Post: 13th March 2007, 10: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.