Your warranties manager
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

20 行
473 B

  1. #include "mainwindow.h"
  2. #include <QApplication>
  3. #include <QTranslator>
  4. #include <QLocale>
  5. #include <QLibraryInfo>
  6. int main(int argc, char *argv[])
  7. {
  8. QApplication a(argc, argv);
  9. MainWindow w;
  10. QString locale = QLocale::system().name().section('_', 0, 0);
  11. QTranslator translator;
  12. translator.load(QString("qt_") + locale, QLibraryInfo::location(QLibraryInfo::TranslationsPath));
  13. a.installTranslator(&translator);
  14. w.show();
  15. return a.exec();
  16. }