2018-08-17 23:13:20 -07:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QLabel>
|
|
|
|
#include <QMouseEvent>
|
|
|
|
|
|
|
|
class ClickableLabel : public QLabel {
|
2019-06-22 22:13:45 -07:00
|
|
|
Q_OBJECT
|
2018-08-17 23:13:20 -07:00
|
|
|
|
|
|
|
public:
|
|
|
|
inline ClickableLabel(QWidget *parent = 0) : QLabel(parent) {}
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void clicked();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void mousePressEvent(QMouseEvent *event)
|
|
|
|
{
|
|
|
|
emit clicked();
|
|
|
|
event->accept();
|
|
|
|
}
|
|
|
|
};
|