1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
#pragma once
#include <QPushButton>
/* 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)
{
}
};
|