-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
37 lines (26 loc) · 911 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
35
36
37
#include <QTranslator>
#include <QIcon>
#include <QApplication>
#include "navogator.h"
#include "tablemodel.h"
#include "mytableview.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
//=== переводчик
QTranslator translator;
QString filespec=QString(/*"Navigator_"*/":/Translations/Navigator_");
filespec += QLocale::system().name();
translator.load(filespec,".");
QApplication ::installTranslator(&translator);
//--перевод в стандартных диалогах
QString filespec2=QString("qt_")+QLocale::system().name();
QString directory2=QLibraryInfo::location(QLibraryInfo::TranslationsPath);
QTranslator translator2;
translator2.load(filespec2, directory2);
QApplication ::installTranslator(&translator2);
//===
Navogator w;
w.show();
return a.exec();
}