Globals: fixed an issue determining the Qt binaries path when 'qt5-applications' is not installed. maintenance

Sun, 06 Dec 2020 12:25:09 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 06 Dec 2020 12:25:09 +0100
branch
maintenance
changeset 7858
b8223c11fd4b
parent 7851
f7e34fa76163
child 7859
2bf9b5ccce4c

Globals: fixed an issue determining the Qt binaries path when 'qt5-applications' is not installed.

eric6/Globals/__init__.py file | annotate | diff | comparison | revisions
--- a/eric6/Globals/__init__.py	Sat Dec 05 12:29:55 2020 +0100
+++ b/eric6/Globals/__init__.py	Sun Dec 06 12:25:09 2020 +0100
@@ -318,9 +318,13 @@
     
     # step 2: try the qt5_applications package
     if not path:
-        import qt5_applications
-        path = os.path.join(os.path.dirname(qt5_applications.__file__),
-                            "Qt", "bin")
+        try:
+            import qt5_applications
+            path = os.path.join(os.path.dirname(qt5_applications.__file__),
+                                "Qt", "bin")
+        except ImportError:
+            # qt5-applications is not installed; just go to the next step
+            pass
     
     # step 3: determine from used Python interpreter (designer is test object)
     if not path:

eric ide

mercurial