-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
40 lines (30 loc) · 948 Bytes
/
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
//#define QUAZIP_STATIC
#include <QApplication>
#include <QSettings>
#include <QXmlStreamReader>
#include <QDir>
#include <QLocale>
#include <QTranslator>
//#include <QtDebug>
#include "mainwindow.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
Q_INIT_RESOURCE(icons);
QString locale = QLocale::system().name().left(2);
//qDebug() << locale;
QTranslator translator;
translator.load("RecMasterNCutter_" + locale, ":/translations/");
a.installTranslator(&translator);
QCoreApplication::setOrganizationName("BGak");
QCoreApplication::setApplicationName("RecMasterNCutter");
QCoreApplication::setApplicationVersion("0.9");
#ifdef Q_OS_WIN32
QSettings::setPath(QSettings::IniFormat, QSettings::UserScope, QDir::homePath());
#else
QSettings::setPath(QSettings::NativeFormat, QSettings::UserScope, QDir::homePath());
#endif
MainWindow w;
w.show();
return a.exec();
}