1 #ifndef DOUBLE_CLICKABLE_PUSH_BUTTON_HPP_ 2 #define DOUBLE_CLICKABLE_PUSH_BUTTON_HPP_ 3 4 #include <QPushButton> 5 6 // 7 // DoubleClickablePushButton - QPushButton that emits a mouse double 8 // click signal 9 // 10 // Clients should be aware of the QWidget::mouseDoubleClickEvent() 11 // notes about receipt of mouse press and mouse release events. 12 // 13 class DoubleClickablePushButton 14 : public QPushButton 15 { 16 Q_OBJECT 17 18 public: 19 DoubleClickablePushButton (QWidget * = nullptr); 20 21 Q_SIGNAL void doubleClicked (); 22 23 protected: 24 void mouseDoubleClickEvent (QMouseEvent *) override; 25 }; 26 27 #endif 28