Fontsize on 'some' windows machines too big
-
Hi all,
Creating pyuic5 py files from QT designer .ui files.
On 'some' windows machines (definitly on a Surface book 2), the interface font size is way too big. (See the image below.)
Is this a known issue?
I'm going to try to decrease the pointsize, with some code like:font = self.font()
font.setPointSize(9) # 13 is default
QApplication.instance().setFont(font)Not sure it that will work, but if it does, is there a way to detect what machines will have this issue so my work can auto adjust?
Thanks,
Bouke -
@Bouke It's probably related to https://doc.qt.io/qt-5/highdpi.html
-
Yeah, that seemed to be the case.
I've added:
os.environ["QT_AUTO_SCREEN_SCALE_FACTOR"] = "1"
qapp = QApplication(sys.argv)
qapp.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling)and now it looks normal at the clients side.
(I don't have a similar system, so I can't really test.)Next step is to make QT aware of the Zoom factor as set in Windows.
Any hints on that?Bouke