PDA

View Full Version : Font size setting of the os ignored by the qt app



jgfedg
24th January 2007, 12:41
I tried the "Getting Started" application, and found out that the font size in the qt application is the same regardless of the "Font size" setting of the operating system. I use Windows and have Font size set to "Large fonts".

Any way to get the qt app take the font size setting into account?

e8johan
26th January 2007, 11:15
Which application is the getting started app? In my experience the widget's texts integrate well with the rest of the OS and I use a slightly larger font size than default...

Could it be that the widgets you are referring to are drawing without the help of a QStyle - hence uses a fixed font size?

Brandybuck
26th January 2007, 22:22
First of all, make sure your application isn't hardcoding any font sizes. This is unfortunately easy to do in Designer, because if you change any font property (such as bold), then Designer will generate a UI file with ALL font properties set.

Otherwise Qt should be using the system defined application font.

Second, make sure other (non-browser) applications are reflecting this font size change. For some fonts and display resolutions, setting "Large Fonts" won't result in a noticable size difference. On my laptop, setting "Large Fonts" will make the titlebar fonts larger, but everything else will visually look the same.

jgfedg
30th January 2007, 07:35
Thanks for your answers.

I was able to reproduce the situation also with the "Qt Examples and Demos" application Dialogs/Standard Dialogs.

In my Windows environment (with "Large fonts" enabled) for example the getInteger() dialog has smaller font in the dialog text and the buttons compared to for example the Information() dialog.