Qt设置启动页面

 

#include <QSplashScreen>

QPixmap pixmap(":/Resources/login.png");
QSplashScreen splash(pixmap);
splash.show();
 
//设置显示信息
splash.showMessage("程序初始化中...", Qt::AlignLeft | Qt::AlignBottom, QColor(255, 255, 255));

QWidget* w = new Widget(this);
w->show();
splash.finish(w);//程序启动画面结束

 

posted @ 2023-03-27 16:07  远方是什么样子  阅读(91)  评论(0编辑  收藏  举报