Thu, 21 Oct 2021 17:59:03 +0200
Added code for all platforms to adjust the Qt library paths array.
eric7/Toolbox/Startup.py | file | annotate | diff | comparison | revisions |
--- a/eric7/Toolbox/Startup.py Wed Oct 20 20:06:23 2021 +0200 +++ b/eric7/Toolbox/Startup.py Thu Oct 21 17:59:03 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.getPyQt6ModulesDirectory(), "plugins") + libPaths = ( + os.path.join(Globals.getPyQt6ModulesDirectory(), "plugins"), + os.path.join(Globals.getPyQt6ModulesDirectory(), "Qt6", "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 = {}