My Qt widget application runs fine on Linux and Windows. On Mac OS X it works, but all fonts appear much smaller (compared to Windows/Linux).
What is the best way to adjust this properly? Some thoughts:
- Is there some "secret" parameter I can use to achieve a similar impression? Like Can I set QT_AUTO_SCREEN_SCALE_FACTOR behavior via API? for HI DPI
- Is using a style sheet the best way to globally adjust the font for the whole application?
- Can I somehow calculate the ratio between Windows/Max OS X fonts so I do know all Windows
8pt
fonts have to be12pt
on Mac OS X? - Or is it better to change the font family on Mac OS X (is there a font family giving me the same visual impression as on Windows / Linux)?
Related: I do understand the question has been asked already, but all those refer to much older Qt or Mac OS X versions. So I dare to bring up that topic again.
- QT Framework QML Application fonts too small on Mac OS X 5 years old, no answer
- Qt Cross-platform Windows & Mac: Font size
- Qt font families and styles on Mac OS X
Edit: Visual impression
Unfortunately I do not have perfect screenshots at hand, but here is how it looks like. The Windows and Linux version are almost pixel identical. The Mac fonts appear too small (MAC OS X right, Windows left), which is the same all over the application (table view, ....)
Currently I do set the fonts via a stylesheet. So the font is 8pt
, no pixel size. When I set it to 12pt
(trial and error) on Mac OX X the representation is approximately to Windows/Linux.
QWidget {
color: white;
font-family: "Arial";
font-size: 8pt;
font-style: normal;
font-weight: bold;
}