eric6/Toolbox/Startup.py

branch
maintenance
changeset 8731
c6264a513aa4
parent 8176
31965986ecd1
parent 8717
8a57b409ab51
diff -r 017669ce3d3f -r c6264a513aa4 eric6/Toolbox/Startup.py
--- a/eric6/Toolbox/Startup.py	Sat Sep 04 11:35:19 2021 +0200
+++ b/eric6/Toolbox/Startup.py	Sat Oct 30 10:41:14 2021 +0200
@@ -160,16 +160,20 @@
 
 def setLibraryPaths():
     """
-    Module function to set the Qt library paths correctly for windows systems.
+    Module function to set the Qt library paths correctly.
     """
-    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