-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.cpp
More file actions
43 lines (34 loc) · 1.02 KB
/
Copy pathmain.cpp
File metadata and controls
43 lines (34 loc) · 1.02 KB
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
40
41
42
43
#include "mainwindow.h"
#include "loginform.h"
#include <QSplashScreen>
#include <QTimer>
#include <QFile>
#include <QApplication>
QString estilo_normal;
QString estilo_404;
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QPixmap pixmap(":/new/prefix1/images/splash.png");
QSplashScreen splash(pixmap, Qt::WindowStaysOnTopHint);
splash.show();
loginForm w;
//splash.showMessage("Loaded modules");
QFile styleFile(":/new/prefix1/stylesheets/stylesheet.css");
if(styleFile.open(QIODevice::ReadOnly | QIODevice::Text))
{
estilo_normal = styleFile.readAll();
a.setStyleSheet(estilo_normal);
}
styleFile.close();
QFile es(":/new/prefix1/stylesheets/stylesheet_404.css");
if(es.open(QIODevice::ReadOnly | QIODevice::Text))
{
estilo_404 = es.readAll();
}
es.close();
QTimer::singleShot(20, &splash, &QWidget::close); // keep displayed for 5 seconds
QTimer::singleShot(20, &w, SLOT(show()));
//w.show();
return a.exec();
}