1 Star 7 Fork 6

Towel Roll/基于Arm和Qt的智能车载系统

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
main.cpp 1.14 KB
一键复制 编辑 原始数据 按行查看 历史
Towel Roll 提交于 2023-07-09 12:49 +08:00 . V02.00.00.00.02
#include "carsystem.h"
#include <QApplication>
#include <QLabel>
#include <QMovie>
#include <QSplashScreen>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QPixmap pixmap(":/background-image/background.jpg"); //绑定一个图片
QSplashScreen *splash = new QSplashScreen;
splash->setPixmap(pixmap.scaled(800, 480));
splash->show(); //显示启动画面
splash->showMessage("Version:2.0.0.0.2\nCopyright(c)2023 Towel Roll", Qt::AlignHCenter|Qt::AlignBottom, Qt::white);//版本,版权信息
//显示动画(gif图片)
QLabel *label = new QLabel(splash);
QMovie *movie = new QMovie(":/background-image/gif.gif");
label->setMovie(movie);
movie->start();
label->setGeometry(280, 350, 240, 80);
movie->setScaledSize(label->size());
label->show();
QDateTime n=QDateTime::currentDateTime();
QDateTime now;
do{
now=QDateTime::currentDateTime();
a.processEvents();
} while (n.secsTo(now)<=3);//3为需要延时的秒数
CarSystem w;
w.show();
splash->finish(&w); //当主窗口启动后,启动画面隐藏
delete splash;
return a.exec();
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/towel-roll/SmartCarSystem.git
git@gitee.com:towel-roll/SmartCarSystem.git
towel-roll
SmartCarSystem
基于Arm和Qt的智能车载系统
V2.0

搜索帮助