-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
39 lines (32 loc) · 1.21 KB
/
main.cpp
File metadata and controls
39 lines (32 loc) · 1.21 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
#include <QApplication>
#include <QStyleFactory>
#include <QFont>
#include "MainWindow.h"
int main(int argc, char *argv[]) {
QApplication app(argc, argv);
app.setApplicationName("图书馆座位预约系统");
app.setApplicationVersion("2.0");
app.setOrganizationName("高级程序设计实践");
app.setStyle(QStyleFactory::create("Fusion"));
QFont font("Microsoft YaHei", 10);
app.setFont(font);
app.setStyleSheet(
"QToolTip { "
" background-color: #37474F; "
" color: white; "
" border: 1px solid #263238; "
" padding: 10px; "
" border-radius: 6px; "
" font-size: 14px; "
" font-family: 'Microsoft YaHei'; "
"}"
"QMessageBox { background-color: white; }"
"QMessageBox QLabel { color: #333; font-size: 14px; }"
"QScrollBar:vertical { background: #ECEFF1; width: 10px; border-radius: 5px; }"
"QScrollBar::handle:vertical { background: #90A4AE; border-radius: 5px; min-height: 30px; }"
"QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical { height: 0; }"
);
MainWindow mainWindow;
mainWindow.show();
return app.exec();
}