I'm trying to migrate an existing PyQt5 app to high-dpi for window 10.
The documentation of Qt5 itself speak about high-dpi scaling here: http://doc.qt.io/qt-5/highdpi.html
QT_AUTO_SCREEN_SCALE_FACTOR to "1".
But i can't adapt this in python code :/
Any idea ?
Make sure you're on Qt 5.6+, skim the docs to be aware, then change your app init code to include one line before it and one line after it (written in Python) but it would be similar in C++:
os.environ["QT_AUTO_SCREEN_SCALE_FACTOR"] = "1"
qapp = QApplication(sys.argv)
qapp.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling)
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