Пример #1
0
ImageButton::ImageButton(const QString &icon, bool isDivision, int num, QWidget *parent)
	: QWidget(parent), m_num(num), m_cursoeChangeAble(false)
{
	setAttribute(Qt::WA_TranslucentBackground);

	if (isDivision)
		setDivisionButtonInfo(icon, num);
	else
		setOneButtonInfo(icon, num);
}
Пример #2
0
StaticButton::StaticButton(const QString &icon, bool isDivision, int num, QWidget *parent) :
    QWidget(parent), m_num(num), m_isCursor(false)
{
    this->setAttribute(Qt::WA_TranslucentBackground);
    if(isDivision)
    {
        setDivisionButtonInfo(icon, num);
    }else
    {
        setOneButtonInfo(icon, num);
    }
}