diff options
author | Chris Xiong <chirs241097@gmail.com> | 2016-04-12 23:37:24 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2016-04-12 23:37:24 +0800 |
commit | 43ae9bb08b7f3f18028fa8663a6077f4ae1ccbca (patch) | |
tree | b957cdb79e2af63fd7222c63b9a79e307de4834f /qmidiplayer-desktop/main.cpp | |
parent | cd09a7e8a42c8f3617cfe3c57eed3b96bcfd2ec5 (diff) | |
download | QMidiPlayer-43ae9bb08b7f3f18028fa8663a6077f4ae1ccbca.tar.xz |
Mysterious Mountain. (Partially fixed #2)
Diffstat (limited to 'qmidiplayer-desktop/main.cpp')
-rw-r--r-- | qmidiplayer-desktop/main.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/qmidiplayer-desktop/main.cpp b/qmidiplayer-desktop/main.cpp index c9f3b42..3a7e630 100644 --- a/qmidiplayer-desktop/main.cpp +++ b/qmidiplayer-desktop/main.cpp @@ -18,10 +18,19 @@ #include "qmpmainwindow.hpp" #include <QApplication> #include <QStyle> +#include <QTranslator> +#include <QLibraryInfo> int main(int argc,char **argv) { QApplication a(argc,argv); + QTranslator qtTranslator; + qtTranslator.load("qt_"+QLocale::system().name(), + QLibraryInfo::location(QLibraryInfo::TranslationsPath)); + a.installTranslator(&qtTranslator); + QTranslator qmpTranslator; + qmpTranslator.load("qmp_"+QLocale::system().name()); + a.installTranslator(&qmpTranslator); qmpMainWindow w; if(w.pharseArgs(argc,argv)==1)return 0; |