clicklabel.h 363 B

123456789101112131415161718192021
  1. #ifndef CLICKLABEL_H
  2. #define CLICKLABEL_H
  3. #include <QLabel>
  4. #include <QWidget>
  5. class ClickLabel : public QLabel
  6. {
  7. Q_OBJECT
  8. public:
  9. explicit ClickLabel(QWidget *parent = 0);
  10. protected:
  11. void mouseReleaseEvent( QMouseEvent *event );
  12. signals:
  13. void clicked();
  14. public slots:
  15. private:
  16. QString m_str;
  17. };
  18. #endif // CLICKLABEL_H