#include <QtWidgets/QApplication>
#include <QSplashScreen>
#include <QDateTime>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QSplashScreen *splash=new QSplashScreen;
splash->setPixmap(QPixmap("start.png"));
//splash->setWindowFlags(Qt::FramelessWindowHint);
splash->show();
Qt::Alignment topRight =Qt::AlignRight |Qt::AlignTop;
splash->showMessage(QObject::tr("程序.正在启动中......."),
topRight,Qt::white);
Mota w;
QDateTime n2=QDateTime::currentDateTime();
QDateTime now;
do{
now=QDateTime::currentDateTime();
} while (n2.secsTo(now)<=3);//3为需要延时的秒数
w.show();
splash->finish(&w);
delete splash;
return a.exec();
}
#include <QSplashScreen>
#include <QDateTime>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QSplashScreen *splash=new QSplashScreen;
splash->setPixmap(QPixmap("start.png"));
//splash->setWindowFlags(Qt::FramelessWindowHint);
splash->show();
Qt::Alignment topRight =Qt::AlignRight |Qt::AlignTop;
splash->showMessage(QObject::tr("程序.正在启动中......."),
topRight,Qt::white);
Mota w;
QDateTime n2=QDateTime::currentDateTime();
QDateTime now;
do{
now=QDateTime::currentDateTime();
} while (n2.secsTo(now)<=3);//3为需要延时的秒数
w.show();
splash->finish(&w);
delete splash;
return a.exec();
}