-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.cpp
54 lines (46 loc) · 1.06 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#define ISMAINCPP 1
#include "login.h"
#include "maininclude.h"
#include "mainwindow.h"
#include <QApplication>
//QSet<OneResItem> allResItem;
ResItemsTrie resItemsTrie;
QVector<OneOrder> dealorders;
QVector<OneOrder> noworders;
QVector<OneOrder> historys;
QVector<OneResOrder> dealResOrders;
User thisUser;
Config config("./config.ini");
Database *useBase;
/* 免登录,测试所用
int main(int argc, char* argv[])
{
QApplication a(argc, argv);
// if (!initItems()) {
// return -1;
// }
//Login* login = new Login();
//login->show();
MainWindow w;
//w.setLoginWindow(login);
//w.hide();
w.show();
return a.exec();
}
*/
int main(int argc, char* argv[])
{
QApplication a(argc, argv);
QFile file(":/text/style.qss");
if (file.open(QFile::ReadOnly)) {
QString styleSheet = QLatin1String(file.readAll());
a.setStyleSheet(styleSheet);
file.close();
}
Login* login = new Login();
login->show();
MainWindow w;
w.setLoginWindow(login);
w.hide();
return a.exec();
}