QT5.5.1版本的多语言功能怎么写啊。

[复制链接]
查看11 | 回复1 | 2021-1-27 06:05:25 | 显示全部楼层 |阅读模式
有大神教教我么。本人是新手。我想弄成多语言程序。可是不知道怎么写。
connect(m_pActionChinese,SIGNAL(triggered()),this,SLOT(slotChinese()));
下面这个函数看不懂。有大神么。求!
voidSecurGuards::slotChinese()
{intindex=ui->stackedWidget->currentIndex();
QApplication::removeTranslator(m_pTranslator);
m_pTranslator->load("./translations/en.qm");
QApplication::installTranslator(m_pTranslator);
this->ui->retranslateUi(this);
updateText();
setIndex(index);
}
分 -->
回复

使用道具 举报

千问 | 2021-1-27 06:05:25 | 显示全部楼层
百度搜相关关键字。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行