-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
34 lines (28 loc) · 756 Bytes
/
Copy pathmain.cpp
File metadata and controls
34 lines (28 loc) · 756 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
#include "widget.h"
#include "config.h"
#include "TranslationManager.h"
#include <QApplication>
#include <QSettings>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
a.setStyleSheet(R"(
QToolTip {
background-color: white;
color: white;
border: 1px solid gray;
border-radius: 4px;
padding: 4px;
}
)");
QSettings s(ORG, APP);
QString code = s.value(KEY_LANG, "zh_CN").toString();
TranslationManager::instance().loadInitial(code);
Widget w;
QStringList args = QCoreApplication::arguments();
if (args.size() > 1) {
w.openFileFromPath(QFileInfo(args.at(1)).absoluteFilePath());
}
w.show();
return a.exec();
}