Qt安装目录下有qt_zh_CN.qm

工程文件中添加资源文件,将qt_zh_CN.qm加入。

之后在main.cpp中加上

QTranslator *trans = new QTranslator;

trans->load(":/image/qt_zh_CN.qm");

a.installTranslator(trans); 

1.原来程序是这样的:

Qt Qlineedit右击自带的菜单默认英文转中文

2.加上翻译代码之后程序:

Qt Qlineedit右击自带的菜单默认英文转中文

 

 

相关文章:

  • 2021-10-18
  • 2022-12-23
  • 2022-12-23
  • 2021-11-15
  • 2021-11-28
  • 2022-01-01
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-01-01
  • 2022-12-23
  • 2021-12-22
  • 2021-09-17
  • 2022-12-23
  • 2021-09-02
相关资源
相似解决方案