eric6_webbrowser.py

branch
6_1_x
changeset 4938
78287a4f976b
parent 4632
ca310db386ed
child 5389
9b1c800daff3
--- a/eric6_webbrowser.py	Tue Apr 12 18:48:33 2016 +0200
+++ b/eric6_webbrowser.py	Tue Apr 12 18:59:51 2016 +0200
@@ -30,6 +30,22 @@
 import sys
 import os
 
+try:
+    from PyQt5 import QtWebKit      # __IGNORE_WARNING__
+except ImportError:
+    from PyQt5.QtCore import qVersion, QTimer
+    from PyQt5.QtWidgets import QApplication
+    from E5Gui import E5MessageBox
+    app = QApplication([])
+    QTimer.singleShot(0, lambda: E5MessageBox.critical(
+        None,
+        "eric6 Web Browser (QtWebKit based)",
+        "QtWebKit is needed to run this variant of the eric6 Web Browser."
+        " However, it seems to be missing. You are using Qt {0}, which"
+        " doesn't include this anymore.".format(qVersion())))
+    app.exec_()
+    sys.exit(100)
+
 for arg in sys.argv[:]:
     if arg.startswith("--config="):
         import Globals

eric ide

mercurial