-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
41 lines (38 loc) · 1.3 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
#ifdef __wasm__
#include "wasm.h"
#else
#include "sheet.h"
#endif
#include <QApplication>
#ifdef __wasm__
QApplication* g_app = nullptr;
Sheet* g_sheet = nullptr;
int main(int argc, char* argv[]) {
g_app = new QApplication(argc, argv);
g_app->setStyleSheet("QMenu::item { background-color: white;"
" selection-background-color: lightgray;"
" color: black; }"
"QMenu::Item:disabled { color: lightgray; }"
"QMenu::separator { background: white;"
" border-color: black; }"
"QCheckBox { color: black }");
g_sheet = new Sheet();
g_sheet->show();
return 0;
}
#else
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
a.setStyleSheet("QMenu::item { background-color: white;"
" selection-background-color: lightgray;"
" color: black; }"
"QMenu::Item:disabled { color: lightgray; }"
"QMenu::separator { background: white;"
" border-color: black; }"
"QCheckBox { color: black }");
Sheet w;
w.show();
return a.exec();
}
#endif