一 在代码中需要翻译的控件使用tr()标识 如下: MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); ui->pushButton->setText(tr("按钮")); } 二 在程序的.pro文件中添加如下: TRANSLATIONS = test_en.ts #est_zh.ts为要生成的.ts文件名自己可以自定义 三