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

}

相关文章:

  • 2021-12-04
  • 2021-08-09
  • 2021-09-13
  • 2021-06-29
  • 2021-09-25
  • 2021-06-21
  • 2021-10-17
  • 2022-12-23
猜你喜欢
  • 2021-07-01
  • 2021-12-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-30
  • 2022-01-08
相关资源
相似解决方案