diff --git a/qutebrowser/app.py b/qutebrowser/app.py index de8a131ad..62cbf48c3 100644 --- a/qutebrowser/app.py +++ b/qutebrowser/app.py @@ -34,7 +34,7 @@ import tokenize from PyQt5.QtWidgets import QApplication, QWidget from PyQt5.QtGui import QDesktopServices, QPixmap, QIcon, QWindow from PyQt5.QtCore import (pyqtSlot, qInstallMessageHandler, QTimer, QUrl, - QObject, QEvent, pyqtSignal) + QObject, QEvent, Qt, pyqtSignal) try: import hunter except ImportError: @@ -70,6 +70,14 @@ def run(args): quitter = Quitter(args) objreg.register('quitter', quitter) + # Enable HighDPI + assert QApplication.instance() is None + try: + QApplication.setAttribute(Qt.AA_EnableHighDpiScaling, True) + except AttributeError: + # Qt < 5.6 + pass + global qApp qApp = Application(args) qApp.setOrganizationName("qutebrowser")