PDA

View Full Version : Changing Windows default font/icons size also changes my application font size



tcampos
30th March 2012, 13:55
Hi there,

Since I'm counting on fonts to draw some elements in a qpainterpath, changing the MS Windows default font/icons size also changes the size of that elements that are connected to lines and another shapes that are drawn straightly with Qt, making them to lose the wanted shape.
How can I avoid this issue?

Thank you very much.

SeeLook
30th March 2012, 16:46
Hi

You have to hardcode fontsize
QFont::setPixelSize or setFontSize
or even put that method in resizeEvent if Your widget is resizable.
You need to experiment with size to obtain that suitable for You.