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();

}

posted @ 2014-05-21 15:00  ahuo  阅读(915)  评论(0编辑  收藏  举报