diff options
Diffstat (limited to 'libs/installer_omod/src/oldstuff/MIT-licencedCodeToDoStuff/clickablelabel.h')
| -rw-r--r-- | libs/installer_omod/src/oldstuff/MIT-licencedCodeToDoStuff/clickablelabel.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/libs/installer_omod/src/oldstuff/MIT-licencedCodeToDoStuff/clickablelabel.h b/libs/installer_omod/src/oldstuff/MIT-licencedCodeToDoStuff/clickablelabel.h new file mode 100644 index 0000000..c3ee22b --- /dev/null +++ b/libs/installer_omod/src/oldstuff/MIT-licencedCodeToDoStuff/clickablelabel.h @@ -0,0 +1,27 @@ +#ifndef CLICKABLELABEL_H +#define CLICKABLELABEL_H + +#include <QLabel> +#include <QMouseEvent> + +/** + * @brief The ClickableLabel class + * https://wiki.qt.io/Clickable_QLabel + */ +class ClickableLabel : public QLabel +{ + Q_OBJECT +public: + explicit ClickableLabel(QWidget *parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags()); + explicit ClickableLabel(const QString &text, QWidget *parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags()); + ~ClickableLabel() override; + +signals: + void clicked(); + +protected: + void mouseReleaseEvent(QMouseEvent *event) override; + +}; + +#endif // CLICKABLELABEL_H |
