File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 55#include < QIcon>
66#include < QLocale>
77#include < QTranslator>
8+ #include < QLibraryInfo>
89
910#include " mainwindow.h"
1011
@@ -62,9 +63,14 @@ int main(int argc, char *argv[])
6263 app.setOrganizationName (" QHexEdit" );
6364 app.setWindowIcon (QIcon (" :images/qhexedit.ico" ));
6465
65- QTranslator translator;
66- if (translator.load (QLocale (), QString (" qhexedit" ), QString (" _" ), QString (" :/translations" )))
67- QCoreApplication::installTranslator (&translator);
66+ QTranslator translator_app;
67+ if (translator_app.load (QLocale (), " qhexedit" , " _" , " :/translations" ))
68+ QCoreApplication::installTranslator (&translator_app);
69+
70+ QTranslator translator_qt;
71+ QString path = QLibraryInfo::path (QLibraryInfo::TranslationsPath);
72+ if (translator_qt.load (QLocale (), " qt" , " _" , path))
73+ QCoreApplication::installTranslator (&translator_qt);
6874
6975 QCommandLineParser parser;
7076 parser.setApplicationDescription (QCoreApplication::translate (" QHexEdit" , " A hex editor application" ));
You can’t perform that action at this time.
0 commit comments