Results 1 to 3 of 3

Thread: Double Click Key

  1. #1
    Join Date
    Jan 2011
    Posts
    32
    Qt products
    Qt4
    Platforms
    Windows

    Default Double Click Key

    Hi All,

    I am trying to figure out how handle double click event on Button. For example: while the app is play music on you mobile and you want to pause the music for whatever reason, then the user must double click a hot key, lets say 7 and to unpause, double click 9.

    Reason for double click is basically to avoid accidental clicks. I can do this with single KeyPress event but dont know how to register double click.

    Please help any direction would be great.

    Regards,
    Javed

  2. #2
    Join Date
    Jan 2011
    Location
    Netherlands
    Posts
    17
    Thanks
    4
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Double Click Key

    My solution would be to start a timer after the keypressevent is fired. Then set a boolean to true. If the timer times out then set the boolean to false again. If the keypresevent fires again and the boolean is true then do your thing (and setting the boolean to false again).

  3. #3
    Join Date
    Jan 2011
    Posts
    32
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Double Click Key

    thanks for your reply. i was also thinking on similar line.

Similar Threads

  1. Replies: 6
    Last Post: 5th June 2009, 09:38
  2. Replies: 2
    Last Post: 11th January 2009, 23:24
  3. QToolBar double click
    By sdfisher in forum Qt Programming
    Replies: 4
    Last Post: 8th October 2007, 06:19
  4. QGraphicsScene Click / Double Click
    By philentropist in forum Qt Programming
    Replies: 1
    Last Post: 9th February 2007, 04:32
  5. Replies: 5
    Last Post: 12th January 2006, 15:40

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.