From 61ebc56db9f897ccb709d8c8b15db46bf73ae32e Mon Sep 17 00:00:00 2001 From: Patrick Stewart Date: Fri, 29 Jul 2016 14:18:03 +0100 Subject: [PATCH] Enable high DPI scaling on Qt >= 5.6 --- spyderlib/app/spyder.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spyderlib/app/spyder.py b/spyderlib/app/spyder.py index ffa28946ffc..c8e28def5a2 100644 --- a/spyderlib/app/spyder.py +++ b/spyderlib/app/spyder.py @@ -90,6 +90,12 @@ # Avoid a bug in Qt: https://bugreports.qt.io/browse/QTBUG-46720 from qtpy import QtWebEngineWidgets # analysis:ignore +#============================================================================== +# Proper high DPI scaling is available in Qt >= 5.6.0. This attibute must +# be set before creating the application +#============================================================================== +if hasattr(Qt, 'AA_EnableHighDpiScaling'): + QCoreApplication.setAttribute(Qt.AA_EnableHighDpiScaling, True) #============================================================================== # Create our QApplication instance here because it's needed to render the