eric6/Toolbox/Startup.py

changeset 8707
05749c827c77
parent 8143
2c730d5fd177
child 8717
8a57b409ab51
equal deleted inserted replaced
8684:8574ff3f3a0c 8707:05749c827c77
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.getPyQt5ModulesDirectory(), "plugins") 166 os.path.join(Globals.getPyQt5ModulesDirectory(), "plugins"),
167 os.path.join(Globals.getPyQt5ModulesDirectory(), "Qt5", "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