Details
-
Task
-
Status: Closed
-
Not Evaluated
-
Resolution: Done
-
None
-
None
-
None
-
Qt-4.6 (default, i.e. Carbon)
Mac OS 10.5
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).