0
点赞
收藏
分享

微信扫一扫

QT 5.3 VS2010 中文

孟佳 2022-05-19 阅读 58


#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 条评论