Continued porting the web browser. QtWebEngine

Fri, 11 Mar 2016 19:49:18 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Fri, 11 Mar 2016 19:49:18 +0100
branch
QtWebEngine
changeset 4840
69ee7965ba27
parent 4839
322f2107902d
child 4845
2d22ff71c005

Continued porting the web browser.

- improved the main script startup error messages

eric6_browser.py file | annotate | diff | comparison | revisions
--- a/eric6_browser.py	Fri Mar 11 19:44:05 2016 +0100
+++ b/eric6_browser.py	Fri Mar 11 19:49:18 2016 +0100
@@ -68,7 +68,20 @@
 sys.path.insert(2, os.path.join(os.path.dirname(__file__),
                                 "ThirdParty", "Pygments"))
 
-from PyQt5 import QtWebEngineWidgets    # __IGNORE_WARNING__
+try:
+    from PyQt5 import QtWebEngineWidgets    # __IGNORE_WARNING__
+except ImportError:
+    from PyQt5.QtCore import QTimer
+    from PyQt5.QtWidgets import QApplication
+    from E5Gui import E5MessageBox          # __IGNORE_WARNING__
+    app = QApplication([])
+    QTimer.singleShot(0, lambda: E5MessageBox.critical(
+        None,
+        "eric6 Web Browser",
+        "QtWebEngineWidgets is not installed but needed to execute the"
+        " web browser."))
+    app.exec_()
+    sys.exit(100)
 
 import Globals
 from Globals import AppInfo

eric ide

mercurial