-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
32 lines (27 loc) · 861 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
#include <QtGui/QApplication>
#include <QTranslator>
#include <QLibraryInfo>
#include <QLocale>
#include "ui/mainwindow.h"
#include "ui/opendialog.h"
#include <iostream>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QSettings settings("TUBS","OpenCompetition");
//QLocale::setDefault(QLocale::system());
QLocale german(QLocale::German,QLocale::Germany);
QLocale::setDefault(german);
QTranslator qtTranslator;
qtTranslator.load("lang/"+german.name());
std::cout << german.name().toStdString().c_str() << std::endl;
a.installTranslator(&qtTranslator);
OpenDialog od(&settings);
QString openFileName = od.getSelectedFile();
if (openFileName != "") {
MainWindow w(openFileName, &settings);
w.show();
return a.exec();
}
return 0;
}