/[qspeakers]/main.cpp
ViewVC logotype

Contents of /main.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 75 - (show annotations)
Sun Oct 26 01:24:10 2014 UTC (6 years, 11 months ago) by ben
File size: 803 byte(s)
use translation (not functionnal)
1 #include "mainwindow.h"
2 #include "importexport.h"
3 #include <QApplication>
4 #include <QTranslator>
5 #include <QLibraryInfo>
6 #include <QLocale>
7
8 int main(int argc, char *argv[])
9 {
10 QApplication a(argc, argv);
11 a.setOrganizationName("Herewe");
12 a.setOrganizationDomain("herewe");
13 a.setApplicationName("QSpeakers");
14
15
16 QTranslator qtTranslator;
17 qtTranslator.load("qt_" + QLocale::system().name(),
18 QLibraryInfo::location(QLibraryInfo::TranslationsPath));
19 a.installTranslator(&qtTranslator);
20
21 QTranslator qspeakersTranslator;
22 qspeakersTranslator.load("qspeakers_" + QLocale::system().name());
23 a.installTranslator(&qspeakersTranslator);
24
25 if (argc > 1)
26 ImportExport::setSavePath(argv[argc - 1]);
27
28 MainWindow w;
29 w.show();
30
31 return a.exec();
32 }

  ViewVC Help
Powered by ViewVC 1.1.26