I am trying to change the language translations dynamically, using something like:
if (lang == "en")
{
if (translator)
app->removeTranslator(translator);
}
else
{
translator->load(lang, "/translations");
app->installTranslator(translator);
QCoreApplication::installTranslator(translator);
}
if (lang == "ja")
{
QApplication::setFont(QFont("japanese"));
}
else
{
QApplication::setFont(defaultFont);
}
This works well enough except when changing the default font to Japanese all of the text with font.bold disappears until the QML is reloaded.
Is there something additional that needs to happen to change the default font for bold or something?
↧