Qt 之程序启动画面
2015-08-27 17:38
330 查看
#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();
}
相关文章推荐
- SPOJ QTREE 树链剖分
- Ubuntu下QT程序中编译时出现speex/speex.h: No such file or directory
- Qt 导出EXCEL文件
- Qt中rotate和trabslate的使用
- Qt安装配置
- emqttd(Erlang开发MQTT消息服务器) V0.10.0 免费版怎么样
- Qt 对话框显示控制按钮
- Qt+MSVC2013 使用QtCreator中文乱码问题
- Qt调用dll的步骤
- Qt入门学习——Qt Creator的使用
- QT之QListWidget与QListWidgetItem
- QT事件(2)
- Qt 之 运行Qt Creator出现cannot find -lGL的问题的两种解决
- Ubuntu下Qt4.8.6生成的界面中文无法显示的问题
- Qt QString的arg()方法的使用
- Qt Designer中的layoutstretch属性
- vs2012+qt5.2.0环境搭建/vs2013 + qt5.3.2 环境搭建
- 零基础学Qt 4编程实例之Qt 样式表的应用
- Qt知识点、疑难杂症的治疗
- Qt中的多线程技术