-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.cpp
34 lines (27 loc) · 892 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
#include <QtGui/QApplication>
#include <QTranslator>
#include <QLocale>
#include <QLibraryInfo>
#include "mainwindow.h"
#include "logsystem.h"
int main(int argc, char *argv[])
{
QFile file("LogFichier");
file.open(QIODevice::WriteOnly | QIODevice::Text);
file.close();
LogSystem::imprim(LogMessage("Demarrage de l'application", 1));
QApplication CooCoo(argc, argv);
// Traduction des QMessageBox en français
QString locale = QLocale::system().name().section('_', 0, 0);
QTranslator translator;
translator.load(QString("qt_") + locale, QLibraryInfo::location(QLibraryInfo::TranslationsPath));
CooCoo.installTranslator(&translator);
// Fin de trad
MainWindow fenetre;
fenetre.InitParam();
fenetre.show();
fenetre.refresh();
CooCoo.exec();
LogSystem::imprim(LogMessage("Fermeture de l'application", 1));
return 0;
}