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. String in titlebar becomes rubbisch after translation (font problem?)
Qt 6.11 is out! See what's new in the release blog

String in titlebar becomes rubbisch after translation (font problem?)

Scheduled Pinned Locked Moved General and Desktop
5 Posts 4 Posters 2.5k 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.
  • S Offline
    S Offline
    stefh
    wrote on last edited by
    #1

    Hi,

    we have a GUI in QT4.5.0 with internationalisation:

    @ MainWnd->setWindowTitle(QApplication::translate("MainWnd", "testtest", 0, QApplication::UnicodeUTF8));@

    For English, the title "testtest" shows nicely.
    But when switching to Hebrew, we get rubbisch (on our English Windows PC) although the rest of the GUI (Arial font) translates fine (see img).
    On a Hebrew Windows PC, the title shows nicely too.

    !http://home.scarlet.be/sth/titlebar.JPG(titlebar)!

    Q1: are we missing a (Hebrew) font on our English Windows machine?
    Q2: how to find out which is the default font for the title bar?
    Q3: is there a way to tell QT or Windows to set Arial font for the title bar?

    Many thx, br,
    Stef

    1 Reply Last reply
    0
    • K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      -You can call "font()":http://developer.qt.nokia.com/doc/qt-4.8/qapplication.html#font and should be able to find out the default font used. With "setFont ":http://developer.qt.nokia.com/doc/qt-4.8/qapplication.html#setFont you may change the font.-

      [Edit] Did not work!

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0
      • T Offline
        T Offline
        tobias.hunger
        wrote on last edited by
        #3

        koahnig: I doubt that this will effect the font used by the window decoration.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          stefh
          wrote on last edited by
          #4

          Tobias: indeed, it doesn't seem to work:

          @
          QFont f = MainWnd->font(); // font is "MS Shell Dlg"
          f.setFamily( "Arial" );
          MainWnd->setFont(f);
          f = MainWnd->font(); // font is now "Arial" but still rubbisch in the title bar
          @

          Guess this is not something Qt can fix?

          Thx,
          Stef

          [EDIT: code formatting, please wrap in @-tags, Volker]

          1 Reply Last reply
          0
          • G Offline
            G Offline
            giesbert
            wrote on last edited by
            #5

            The window titlebar uses the font that is set in windows settings.
            If this font does not support hebrew (like most english windows do not by default) you see rubbish.

            Nokia Certified Qt Specialist.
            Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

            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