qt/LedOK/LoQClass/loqpushbutton.cpp

28 lines
704 B
C++
Raw Normal View History

2022-01-04 18:11:48 +08:00
#include "loqpushbutton.h"
LoQPushButton::LoQPushButton(QWidget *parent) :
QPushButton(parent),
m_customData(nullptr)
{
connect(this, SIGNAL(clicked(bool)), this, SLOT(onClicked(bool)));
}
LoQPushButton::LoQPushButton(const QString &text, QWidget *parent) :
QPushButton(text, parent),
m_customData(nullptr)
{
connect(this, SIGNAL(clicked(bool)), this, SLOT(onClicked(bool)));
}
LoQPushButton::LoQPushButton(const QIcon& icon, const QString &text, QWidget *parent) :
QPushButton(icon, text, parent),
m_customData(nullptr)
{
connect(this, SIGNAL(clicked(bool)), this, SLOT(onClicked(bool)));
}
void LoQPushButton::onClicked(bool f)
{
emit sigClicked(this, f);
}