#include "mylabel.h" #include MyLabel::MyLabel(QWidget *parent) : QLabel(parent) { } void MyLabel::mouseReleaseEvent(QMouseEvent *ev) { if (ev->button() == Qt::LeftButton) { Q_UNUSED(ev); emit Clicked(); } }