-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
23 lines (22 loc) · 678 Bytes
/
main.cpp
File metadata and controls
23 lines (22 loc) · 678 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "mainwindow.h"
#include <QApplication>
#include <QTranslator>
#include <QLocale>
#include <QDebug>
int main(int argc, char *argv[])
{
// QApplication::setStyle("fusion");
QApplication a(argc, argv);
// translate --->
qDebug("[Message]Starting loading translation files...");
QTranslator translator;
translator.load("trans_"+QLocale::system().name(),":translate");
// qDebug() << QString(PREFIX);
qDebug() << "Your locale is" << QLocale::system().name();
a.installTranslator(&translator);
qDebug()<< "[Message]Finished loading translation files.";
// <---
MainWindow w;
w.show();
return a.exec();
}