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,360
    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, 19:04
  2. Replies: 6
    Last Post: 5th June 2009, 10:38
  3. Replies: 2
    Last Post: 12th January 2009, 00:24
  4. QGraphicsScene Click / Double Click
    By philentropist in forum Qt Programming
    Replies: 1
    Last Post: 9th February 2007, 05:32
  5. Replies: 5
    Last Post: 12th January 2006, 16: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.