Added code for all platforms to adjust the Qt library paths array.

Thu, 21 Oct 2021 17:58:08 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 21 Oct 2021 17:58:08 +0200
changeset 8707
05749c827c77
parent 8684
8574ff3f3a0c
child 8715
197cbf6256de

Added code for all platforms to adjust the Qt library paths array.

eric6/Toolbox/Startup.py file | annotate | diff | comparison | revisions
--- a/eric6/Toolbox/Startup.py	Thu Oct 14 17:46:41 2021 +0200
+++ b/eric6/Toolbox/Startup.py	Thu Oct 21 17:58:08 2021 +0200
@@ -162,14 +162,18 @@
     """
     Module function to set the Qt library paths correctly for windows systems.
     """
-    if Globals.isWindowsPlatform():
-        libPath = os.path.join(Globals.getPyQt5ModulesDirectory(), "plugins")
+    libPaths = (
+        os.path.join(Globals.getPyQt5ModulesDirectory(), "plugins"),
+        os.path.join(Globals.getPyQt5ModulesDirectory(), "Qt5", "plugins"),
+    )
+    
+    libraryPaths = QApplication.libraryPaths()
+    for libPath in libPaths:
         if os.path.exists(libPath):
             libPath = QDir.fromNativeSeparators(libPath)
-            libraryPaths = QApplication.libraryPaths()
             if libPath not in libraryPaths:
                 libraryPaths.insert(0, libPath)
-                QApplication.setLibraryPaths(libraryPaths)
+    QApplication.setLibraryPaths(libraryPaths)
 
 # the translator must not be deleted, therefore we save them here
 loaded_translators = {}

eric ide

mercurial