QT 5.3 VS2010 中文

#include <QtWidgets/QApplication>

#include <QTextCodec>
#include <QLabel>
#pragma execution_character_set("utf-8")
int main(int argc, char *argv[])
{

  QApplication app(argc,argv);
  QLabel hello(QObject::tr("你好世界"));
  hello.setWindowTitle(QObject::tr("Qt中文显示"));
  hello.show();
  return app.exec();

}

你可能感兴趣的:(VS2010)