Skip to content

Commit

Permalink
Enable high DPI scaling on Qt >= 5.6
Browse files Browse the repository at this point in the history
  • Loading branch information
patstew committed Jul 29, 2016
1 parent a3f0644 commit c1e88a2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion spyderlib/app/spyder.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
from qtpy import API, PYQT5
from qtpy.compat import from_qvariant, getopenfilename, getsavefilename
from qtpy.QtCore import (QByteArray, QCoreApplication, QPoint, QSize, Qt,
QThread, QTimer, QUrl, Signal, Slot)
QThread, QTimer, QUrl, Signal, Slot, QT_VERSION)
from qtpy.QtGui import QColor, QDesktopServices, QKeySequence, QPixmap
from qtpy.QtWidgets import (QAction, QApplication, QDockWidget, QMainWindow,
QMenu, QMessageBox, QShortcut, QSplashScreen,
Expand All @@ -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 QT_VERSION >= 0x050600:
QCoreApplication.setAttribute(Qt.AA_EnableHighDpiScaling, True)

#==============================================================================
# Create our QApplication instance here because it's needed to render the
Expand Down

0 comments on commit c1e88a2

Please sign in to comment.