PDA

View Full Version : change language without restart app



nthung
9th November 2011, 10:50
bool load=qTranslator->load("en_la");
QApplication::installTranslator(qTranslator);
m_UI->retranslateUi(this);
I want an app can change language without restart app, and i coded as above.
But that code only run at fisrt correctly. but at second it is incorrect, that is mean that the language can change at the first, and from second can change language
thanks

wysota
9th November 2011, 10:56
Where do you put that code? Do you remove the old translator?

nthung
9th November 2011, 11:31
thanks
i fixed, by incorrect logic
:)