Results 1 to 2 of 2

Thread: Using double click in QPushButton

  1. #1
    Join Date
    Sep 2011
    Posts
    1
    Platforms
    MacOS X

    Default Using double click in QPushButton

    Hello everyone,
    I want to implement a double click signal for push buttons that I create. I have read about QWidget::mouseDoubleClickEvent , but am unable to understand how to use this. Can someone help me out with a sample code for the same ?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Using double click in QPushButton

    Qt Code:
    1. void MyButton::mouseDoubleClickEvent() {
    2. emit doubleClicked();
    3. }
    To copy to clipboard, switch view to plain text mode 
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Double Click Key
    By javed_alam786 in forum Qt Programming
    Replies: 2
    Last Post: 9th February 2011, 18:04
  2. Replies: 6
    Last Post: 5th June 2009, 09:38
  3. Replies: 2
    Last Post: 11th January 2009, 23:24
  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.