QWidget* widget=new QWidget;
widget->resize(800,800);
widget->show();
QPushButton* pushButton=new QPushButton(widget);
pushButton->setGeometry(10,10,200,200);
QPixmap pixmap;
pixmap.load("mypicture");
pushButton->setFixedSize(pixmap.width(),pixmap.height());
pushButton->setIcon(pixmap);
pushButton->setIconSize(QSize(pixmap.width(),pixmap.height()));
pushButton->setToolTip("Login");
pushButton->show();
还有什么不懂的