QT 5.3 VS2010 中文

孟佳

关注

阅读 77

2022-05-19


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



精彩评论(0)

0 0 举报