mirror of https://github.com/qTox/qTox.git
6 changed files with 66 additions and 43 deletions
@ -0,0 +1,11 @@ |
|||||||
|
#include "clickablelabel.h" |
||||||
|
|
||||||
|
ClickableLabel::ClickableLabel(QWidget *parent) : |
||||||
|
QLabel(parent) |
||||||
|
{ |
||||||
|
} |
||||||
|
|
||||||
|
void ClickableLabel::mousePressEvent(QMouseEvent* event) |
||||||
|
{ |
||||||
|
emit clicked(); |
||||||
|
} |
@ -0,0 +1,20 @@ |
|||||||
|
#ifndef CLICKABLELABEL_H |
||||||
|
#define CLICKABLELABEL_H |
||||||
|
|
||||||
|
#include <QLabel> |
||||||
|
|
||||||
|
class ClickableLabel : public QLabel |
||||||
|
{ |
||||||
|
Q_OBJECT |
||||||
|
public: |
||||||
|
explicit ClickableLabel(QWidget *parent = 0); |
||||||
|
|
||||||
|
signals: |
||||||
|
void clicked(); |
||||||
|
|
||||||
|
protected: |
||||||
|
void mousePressEvent ( QMouseEvent * event ); |
||||||
|
|
||||||
|
}; |
||||||
|
|
||||||
|
#endif // CLICKABLELABEL_H
|
Loading…
Reference in new issue