#ifndef CUSTOMLABEL_H #define CUSTOMLABEL_H #include #include class CustomLabel : public QLabel { Q_OBJECT public: explicit CustomLabel(QWidget *parent = 0); signals: void buttonPressed(int x, int y); void leftButtonReleased(int x, int y); void rightButtonReleased(int x, int y); void mouseMoveWithRightButtonPressed(int x, int y); public slots: protected: virtual void mousePressEvent(QMouseEvent *ev); virtual void mouseReleaseEvent(QMouseEvent * ev); virtual void mouseMoveEvent(QMouseEvent *ev); }; #endif // CUSTOMLABEL_H