Files
obs-studio/frontend/components/NonCheckableButton.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

19 lines
534 B
C++

#pragma once
#include <QPushButton>
#include <QString>
#include <QWidget>
/* Button with its checked property not changed when clicked.
* Meant to be used in situations where manually changing the property
* is always preferred. */
class NonCheckableButton : public QPushButton {
Q_OBJECT
inline void nextCheckState() override {}
public:
inline NonCheckableButton(QWidget *parent = nullptr) : QPushButton(parent) {}
inline NonCheckableButton(const QString &text, QWidget *parent = nullptr) : QPushButton(text, parent) {}
};