16,201
社区成员
发帖
与我相关
我的任务
分享
Genre::Genre(const QString & text, QWidget *parent)
:QPushButton(text,parent)
{
this->setIcon(QIcon("Image/Gen_Button.png"));
this->setIconSize(QSize(94, 31));
this->setMask(QBitmap("Image/Gen_Button_B.png"));
this->setFixedSize(94, 31);
this->setFocusPolicy(Qt::NoFocus);
}
#include <QApplication>
#include <QPushButton>
int main(int argc,char **argv)
{
QApplication app(argc,argv);
QPushButton *button = new QPushButton;
button->setText("ok");
button->show();
return app.exec();
}