PDA

View Full Version : Globally reset my font sizes to default?



scott_hollen
1st November 2011, 20:23
Afternoon --

Like an idiot when I recently had to chuck a large portion of my app for a redesign I decided to change the default font sizes on my widgets to be something a little larger (my client/father-in-law complained they were too small). I was developing on a Mac. Then when I ran the app on Windows my fonts were dramatically different, so back on the Mac I returned the font to what it was originally (Lucida Grande 13 point) -- learned the lesson right then about default platform fonts. I continued developing and have upwards so 200 widgets with that font. I know from a little R&D that before I ever messed with the fonts that Windows applied it's default font to the app (MS Shell Dlg2 8 point), so I thought that would happen again by returning the font back to Lucida Grande 13 point on the Mac, but when it runs on Windows now it's still applying the LG 13.

I thought I'd returned the font's back to the Mac default but apparently by messing with it, Qt thinks this is a custom font and is not running with the platform's default, so I'm faced with doing one of the following:

1) Somehow get Qt to "know" that the fonts are defaults and not custom -- is this in a config file somewhere I can modify? I read in another thread that a preferences file can be deleted but didn't want to start doing that without confirmation.
2) Determine at app startup what the platform is and set an application default font.

So in a nutshell, I need to get Qt to see the fonts that are defined as being default and not modified/custom ones, or I need to override the ones that are there...


scott

scott_hollen
1st November 2011, 23:26
Well, I figured it out:

1) Select ALL widgets in Qt Creator Object Inspector
2) Right click and select "Change Text"
3) In the Properties palette, hit the reset button (counter clockwise arrow) beside the font; this seems to apply to every widget, at least it did for me
4) Save