-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
35 lines (27 loc) · 978 Bytes
/
main.cpp
File metadata and controls
35 lines (27 loc) · 978 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
35
#include <QApplication>
#include <QTranslator>
#include <ctime>
#include <cstdio>
#include <cstdlib>
#include "FenetrePrincipale.h"
#include "FenetreCouleurs.h"
#include "FenetreGenerateurs.h"
int main(int argc, char *argv[])
{
QApplication application(argc, argv);
auto locale{QLocale::system().name().section('_', 0, 0)};
if (locale != QString("fr") && locale != QString("en"))
locale = QString("en");
QTranslator translator;
translator.load(QString(":/Langages/qt_") + locale);
application.installTranslator(&translator);
QTranslator translatorBase;
translatorBase.load(QString(":/Langages/qtbase_") + locale);
application.installTranslator(&translatorBase);
QTranslator translatorSubstrate;
translatorSubstrate.load(QString(":/Langages/Substrate_") + locale);
application.installTranslator(&translatorSubstrate);
srand(time(NULL));
FenetrePrincipale fenetrePrincipale;
return application.exec();
}