Missing bold text after switching to japanese default font



  • 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. This occurs in Qt 4.8.x.

    Is there something additional that needs to happen to change the default font for bold or something?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.