eric7/Toolbox/Startup.py

branch
eric7
changeset 8709
41a9ecc5b17b
parent 8459
0ae07748dbe8
child 8718
3456fb2a2cb0
equal deleted inserted replaced
8708:b904e88e04a0 8709:41a9ecc5b17b
160 160
161 def setLibraryPaths(): 161 def setLibraryPaths():
162 """ 162 """
163 Module function to set the Qt library paths correctly for windows systems. 163 Module function to set the Qt library paths correctly for windows systems.
164 """ 164 """
165 if Globals.isWindowsPlatform(): 165 libPaths = (
166 libPath = os.path.join(Globals.getPyQt6ModulesDirectory(), "plugins") 166 os.path.join(Globals.getPyQt6ModulesDirectory(), "plugins"),
167 os.path.join(Globals.getPyQt6ModulesDirectory(), "Qt6", "plugins"),
168 )
169
170 libraryPaths = QApplication.libraryPaths()
171 for libPath in libPaths:
167 if os.path.exists(libPath): 172 if os.path.exists(libPath):
168 libPath = QDir.fromNativeSeparators(libPath) 173 libPath = QDir.fromNativeSeparators(libPath)
169 libraryPaths = QApplication.libraryPaths()
170 if libPath not in libraryPaths: 174 if libPath not in libraryPaths:
171 libraryPaths.insert(0, libPath) 175 libraryPaths.insert(0, libPath)
172 QApplication.setLibraryPaths(libraryPaths) 176 QApplication.setLibraryPaths(libraryPaths)
173 177
174 # the translator must not be deleted, therefore we save them here 178 # the translator must not be deleted, therefore we save them here
175 loaded_translators = {} 179 loaded_translators = {}
176 180
177 181

eric ide

mercurial