I am working on a PyQt4 GUI. During testing I recognized that the font size of all QLabels changes on diffrent computers. Apprently the windows display configurations can be changed from 100% to 125% or 150%, which then changed the fontsize of my widgets.
Is there an option where I can force the GUI to keep its fontsize independently from the display settings?
Thanks in advance for your help.
Control Panel\Appearance and Personalization\Display
you can change the font- and other displayed elements-size. This configuration is independent from the screen resolution, but I dont know if it is independent from the actual dpi of the screen. Since AA_DisableHighDpiScaling
does not work on PyQt4 I'll have to keep looking for another solution.
http://doc.qt.io/qt-5/highdpi.html
Looks like you could disable scaling using this snippet (did not check though):
QGuiApplication().setAttribute(Qt.AA_DisableHighDpiScaling)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With