#include "clickablelabel.h" ClickableLabel::ClickableLabel(QWidget *parent) : QLabel(parent) { } void ClickableLabel::mousePressEvent(QMouseEvent *ev) { if (ev->button() == Qt::LeftButton) emit clicked(ev->globalPos()); } void ClickableLabel::mouseDoubleClickEvent(QMouseEvent *ev) { if (ev->button() == Qt::LeftButton) emit clicked(ev->globalPos()); }