您的位置:首页 > 编程语言 > Qt开发

Qt程序启动画面

2013-01-07 13:22 218 查看
代码如下:

int main(int argc, char *argv[])
{
QApplication a(argc, argv);

QSplashScreen *splash=new QSplashScreen;
splash->setPixmap(QPixmap(":/Game.jpg"));
splash->show();

Qt::Alignment topRight=Qt::AlignRight|Qt::AlignTop;
splash->showMessage(QObject::tr("Setting up the application..."),topRight,Qt::white);

MainWindow w;
splash->showMessage(QObject::tr("Loading the modules..."),topRight,Qt::white);
//    loadModules();
splash->showMessage(QObject::tr("Establing the connection..."),topRight,Qt::white);
w.show();
splash->finish(&w);
delete splash;
return a.exec();
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: