I’m writing a multi-language program with the Qt framework. I want to change the language at runtime. I wrote the code below in a slot but it does not work.
QTranslator translator;
translator.load("arrowpad_tr");
qApp->installTranslator(&translator);
Installing a translator only means that the specific translator becomes available. This is signaled by a LanguageChange event for the QCoreApplication. What you will still have to call is
retranslateUi();which will take care of the actual translation for Qt Designer widgets. For custom widgets you will have to create something similar based on the event.