[Qt] Add constructor to XCheckBox that takes a text parameter
This commit is contained in:
parent
761f3a4735
commit
b2d7ea11f5
|
@ -13,6 +13,11 @@ XCheckBox::XCheckBox(QWidget* parent)
|
|||
setFocusPolicy(Qt::TabFocus); // disable retaining focus through mouse click
|
||||
}
|
||||
|
||||
XCheckBox::XCheckBox(const QString& title, QWidget* parent)
|
||||
: Themeable<QCheckBox>("XCheckBox", title, parent) {
|
||||
setFocusPolicy(Qt::TabFocus); // disable retaining focus through mouse click
|
||||
}
|
||||
|
||||
void XCheckBox::paintEvent(QPaintEvent* e) {
|
||||
QStyleOptionButton option;
|
||||
initStyleOption(&option);
|
||||
|
|
|
@ -19,6 +19,7 @@ class XCheckBox : public Themeable<QCheckBox> {
|
|||
|
||||
public:
|
||||
explicit XCheckBox(QWidget* parent = nullptr);
|
||||
XCheckBox(const QString& text, QWidget* parent = nullptr);
|
||||
|
||||
bool custom() const { return custom_; }
|
||||
void set_custom(bool value) { custom_ = value; }
|
||||
|
|
Loading…
Reference in New Issue