我安装的是qt-opensource-windows-x86-mingw492-5.6.0。下面这段控制台代码在xp下可以正常运行,但是在win10下却不能正常输出中文,哪位大神帮帮忙
#include <QCoreApplication>
#include <iostream>
#include <string>
#include <locale.h>
using namespace std;
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
wstring str2=L"edf汉字输出";
/*
locale::global(locale(""));
setlocale(LC_CTYPE,"");
wcout.imbue(locale(""));
*/
setlocale(LC_ALL,"chs");
wcout<<str2<<endl;
return a.exec();
}