更新时间:2016-02-08 21:43:59浏览次数:1+次
splash->setPixmap(QPixmap(":/images/start.png"));
Qt::Alignment topRight = Qt::AlignRight|Qt::AlignTop;
splash->finish(&window);
#include<QApplication>
#include "mainwindows.h"
#include<QSplashScreen>
#include<QPixmap>
int main(int argc,char*argv[])
{
QApplication app(argc,argv);
QSplashScreen* splash = new QSplashScreen;
splash->setPixmap(QPixmap(":/images/start.png"));
splash->show();
Qt::Alignment topRight = Qt::AlignRight|Qt::AlignTop;
splash->showMessage("正在启动中",topRight,Qt::white);
mainWindows window;
window.show();
splash->finish(&window);
delete splash;
return app.exec();
效果如下:
相关资讯