Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Missing bold text after switching to japanese default font
Forum Updated to NodeBB v4.3 + New Features

Missing bold text after switching to japanese default font

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 493 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    uroller
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved