Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-5469

Widget font changes upon window activation (Mac OSX)

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • Not Evaluated
    • None
    • None
    • GUI: Font handling
    • None
    • Qt-4.6 (default, i.e. Carbon)
      Mac OS 10.5

    • macOS

    Description

      Setting an application font only has an effect until the window is activated (e.g. clicking on its titlebar). At that point the font changes back to the platform-default font, causing a really weird effect.

      Some points that might help with the debugging:

      • the font is changed due to QEvent::ApplicationFontChange
      • ddenis noted that setting QApplication::desktopSettingsAware to false fixes it
      • he also noted that the doc says QApplication::setFont() overrides the default font. Which it obviously doesn't do.

      IMHO this shows two bugs then:

      1) the desktop settings prevailing erroneously over the explicit QApplication::setFont

      2) the desktop settings being applied on WindowActivation event. Surely changing the font (in the case where it should actually be changed), should be done in ShowEvent or PolishEvent, not when, 3 minutes later, the user who started the application from a terminal, activates the window.
      (I guess this went unnoticed because most mac users start their application in a graphical way, so the window is immediately activated. But focus-stealing-prevention makes apps started from a terminal not get activated immediately).

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sorvig Morten Sørvig
            dfaure David Faure (Private)
            Votes:
            5 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes