PDA

View Full Version : QFont and DPI



ArlexBee-871RBO
9th March 2010, 06:38
Hello.

I have some custom widgets with text. The space for the text is static; therefore, the size of the font should also remain static. The problem is that on a system with different DPI the text gets resized. This either causes the text to be too small, or it causes the text to be too large and not fit in the widget.

How do I make sure size of text remains the same regardless of DPI?

Lykurg
9th March 2010, 07:47
Use pixel size:QFont::setPixelSize().

ArlexBee-871RBO
9th March 2010, 14:31
Great. Just what I needed.

Thanks