void MainWindow::SwitchLanguage(QAction *action){ QTranslator translator; if (action == ui->action_eng) translator.load("eng.qm","."); else if (action == ui->action_rus) translator.load("rus.qm","."); else if (action == ui->action_de) translator.load("de.qm","."); //и так далее qApp->installTranslator(&translator); ui->retranslateUi(this);}
connect(grpAct,SIGNAL(triggered(QAction*)),this,SLOT(SwitchLanguage(QAction*)));