判断语言
if (locale.language() == QLocale::Chinese)
{
//...
}
按字符串输出
#include "mytest.h"
#include <QApplication>
#include<QDebug>
#include <QLocale>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
myTest w;
w.show();
QLocale locale;
QString str = QLocale::languageToString(locale.language());
qDebug()<<str;
return a.exec();
}