-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathguiVersion.cpp
More file actions
39 lines (26 loc) · 839 Bytes
/
guiVersion.cpp
File metadata and controls
39 lines (26 loc) · 839 Bytes
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
38
39
#include <QApplication>
#include <QMainWindow>
#include <QSplashScreen>
#include <QDesktopWidget>
#include <QTimer>
#include <QGuiApplication>
#include <QPropertyAnimation>
#include "mainwindow.h"
#include <tclap/CmdLine.h>
using namespace TCLAP;
int main(int argc, char*argv[])
{
QApplication a(argc, argv);
QSplashScreen *splash = new QSplashScreen;
QRect screenGeometry = QApplication::desktop()->screenGeometry();
splash->setPixmap(QPixmap("../examples/splashWithText.jpeg"));
splash->move(0,0*screenGeometry.height() / 2);
splash->show();
MainWindow w;
int x = 0*(screenGeometry.width()-w.width())/2;
int y = (screenGeometry.height()-w.height())/2;
w.move(x,y);
QTimer::singleShot(750,splash,SLOT(close()));
QTimer::singleShot(750,&w,SLOT(show()));
return a.exec();
};