f53df7da64
Code submissions have continually suffered from formatting inconsistencies that constantly have to be addressed. Using clang-format simplifies this by making code formatting more consistent, and allows automation of the code formatting so that maintainers can focus more on the code itself instead of code formatting.
22 lines
305 B
C++
22 lines
305 B
C++
#pragma once
|
|
|
|
#include <QLabel>
|
|
#include <QMouseEvent>
|
|
|
|
class ClickableLabel : public QLabel {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
inline ClickableLabel(QWidget *parent = 0) : QLabel(parent) {}
|
|
|
|
signals:
|
|
void clicked();
|
|
|
|
protected:
|
|
void mousePressEvent(QMouseEvent *event)
|
|
{
|
|
emit clicked();
|
|
event->accept();
|
|
}
|
|
};
|