Unsolved Font size appears really small when switching from Qt 5.12 to Qt 5.15
-
We've been encountering an error where the font size for numbers is super tiny in a version of our software compiled with Qt 5.15.2. With a previous version compiled with Qt 5.12, the numbers show up with the correct size. Since we didn't change any of the code in that area, we were wondering if anyone else had a similar issue to this and, if so, if they have a workaround for it.
-
You should take a look at Qt::AA_EnableHighDpiScaling and friends.
-
Thanks for the response!
We think Qt is not finding the exact font that we are trying to use on the system and going with the closest match. Is there a way to tell the exact font that it is using?
-
something like this. Try it out
QFont font("Courier New");
font.setStyleHint(QFont::Monospace);
QApplication::setFont(font); or
QCoreApplication::setFont(font);