eric6_browser.py

branch
QtWebEngine
changeset 4790
deeea3d64858
parent 4788
7076adec8ddd
child 4831
bf53c06fa0fb
diff -r 30e41032fed7 -r deeea3d64858 eric6_browser.py
--- a/eric6_browser.py	Sun Feb 28 20:09:44 2016 +0100
+++ b/eric6_browser.py	Mon Feb 29 19:30:13 2016 +0100
@@ -35,17 +35,16 @@
 
 from PyQt5.QtCore import qVersion
 if qVersion() < MIN_QT_VERSION:
-    try:    # Py2
-        import tkMessageBox as messagebox
-    except ImportError:
-        try:    # Py3
-            from tkinter import messagebox
-        except ImportError:
-            sys.exit(100)
-    messagebox.showerror(
-        "eric6 Error",
+    from PyQt5.QtCore import QTimer
+    from PyQt5.QtWidgets import QApplication
+    from E5Gui import E5MessageBox
+    app = QApplication([])
+    QTimer.singleShot(0, lambda: E5MessageBox.critical(
+        None,
+        "eric6 Web Browser",
         "You need at least Qt Version {0} to execute the web browser."
-          .format(MIN_QT_VERSION))
+          .format(MIN_QT_VERSION)))
+    app.exec_()
     sys.exit(100)
 
 SettingsDir = None

eric ide

mercurial