diff --git a/qutebrowser/misc/earlyinit.py b/qutebrowser/misc/earlyinit.py index 5e71e8bb1..e84f04f7f 100644 --- a/qutebrowser/misc/earlyinit.py +++ b/qutebrowser/misc/earlyinit.py @@ -262,17 +262,19 @@ def get_backend(args): def check_qt_version(backend): """Check if the Qt version is recent enough.""" - from PyQt5.QtCore import qVersion, PYQT_VERSION + from PyQt5.QtCore import qVersion, PYQT_VERSION, PYQT_VERSION_STR from qutebrowser.utils import qtutils - if qtutils.version_check('5.2.0', operator.lt): - text = ("Fatal error: Qt and PyQt >= 5.2.0 are required, but {} is " - "installed.".format(qVersion())) + if (qtutils.version_check('5.2.0', operator.lt) or + PYQT_VERSION < 0x050200): + text = ("Fatal error: Qt and PyQt >= 5.2.0 are required, but Qt {} / " + "PyQt {} is installed.".format(qVersion(), PYQT_VERSION_STR)) _die(text) elif (backend == 'webengine' and ( qtutils.version_check('5.7.0', operator.lt) or PYQT_VERSION < 0x050701)): text = ("Fatal error: Qt and PyQt >= 5.7.1 are required for " - "QtWebEngine support, but {} is installed.".format(qVersion())) + "QtWebEngine support, but Qt {} / PyQt {} is installed." + .format(qVersion(), PYQT_VERSION_STR)) _die(text)