PDA

View Full Version : Font size int OS



medved6
31st January 2011, 06:25
I use a diffrent fonts/font sizes and styles in software. It all works unless somebody would not change OS font size.

For example in Windows 7 or Vista

Right Click on DeSctop => Personalization => Display.
Thehe are 3 options:

Smaller
Medium
Larger

So if I change it from Smaller to Medium application looks differentlly. Is there any way to ignore such OS settinng in QT application.

How do you deal with such issue?


I'm new at UI programming... So do not know much.:)
Thank you!

wysota
31st January 2011, 09:26
If you use layouts properly and doesn't pre-assume any font size then everything should work as expected. In situations when you need to take the size of the font into account for custom things you do, you can use QFontMetrics to calculate space needed to render some text using the current font.