2019-07-27 12:47:10 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QLabel>
|
|
|
|
#include <QMouseEvent>
|
|
|
|
|
|
|
|
class ClickableLabel : public QLabel {
|
2019-09-22 21:19:10 +00:00
|
|
|
Q_OBJECT
|
2019-07-27 12:47:10 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
inline ClickableLabel(QWidget *parent = 0) : QLabel(parent) {}
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void clicked();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void mousePressEvent(QMouseEvent *event)
|
|
|
|
{
|
|
|
|
emit clicked();
|
|
|
|
event->accept();
|
|
|
|
}
|
|
|
|
};
|