InteractiveLabel.h 377 B

123456789101112131415161718192021222324
  1. #ifndef INTERACTIVELABEL
  2. #define INTERACTIVELABEL
  3. #include <QLabel>
  4. class InteractiveLabel : public QLabel
  5. {
  6. Q_OBJECT
  7. public:
  8. InteractiveLabel(QWidget* parent = 0);
  9. protected:
  10. virtual void enterEvent(QEvent* event);
  11. virtual void leaveEvent(QEvent* event);
  12. signals:
  13. void mouseOver(bool state);
  14. public slots:
  15. void highlight(bool state);
  16. };
  17. #endif // INTERACTIVELABEL