forked from uqzzhao/SurfaceMicroseismicViewer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
37 lines (29 loc) · 802 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include "wviewer.h"
#include <QApplication>
#include <QDesktopWidget>
#include <QObject>
#include <QPixmap>
#include <QSplashScreen>
#include <QElapsedTimer>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
//设置程序启动画面
QPixmap pixmap(":/resources/start.png");
QSplashScreen splash(pixmap);
splash.show();
// 设置画面停留时间为3秒
QElapsedTimer timer;
timer.start();
while (timer.elapsed()<3000)
{
QCoreApplication::processEvents();
}
WViewer w;
w.setWindowTitle(QObject::tr("Surface Microseismic Viewer"));
w.show();
w.move ((QApplication::desktop()->width() - w.width())/2,
(QApplication::desktop()->height() - w.height())/2);
splash.finish(&w);
return a.exec();
}