obs-studio/frontend/components/ClickableLabel.hpp
PatTheMav 3bbda4803e
frontend: Add renamed Qt UI components
This commit only contains Qt UI components that are self-contained,
i.e. the translation units only contain code for a single class or
interface and don't mix implementations.
2025-01-08 15:36:54 +01:00

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();
}
};