eric7/eric7.py

branch
eric7
changeset 8693
d51660d6f1b9
parent 8673
2908e152eb2b
child 8699
8438a5a0437f
equal deleted inserted replaced
8692:9c72f9bc9d72 8693:d51660d6f1b9
40 "eric7 Error", 40 "eric7 Error",
41 "PyQt could not be imported. Please make sure" 41 "PyQt could not be imported. Please make sure"
42 " it is installed and accessible.") 42 " it is installed and accessible.")
43 sys.exit(100) 43 sys.exit(100)
44 44
45 with contextlib.suppress(ImportError): 45 try:
46 from PyQt6 import QtWebEngineWidgets 46 from PyQt6 import QtWebEngineWidgets # __IGNORE_WARNING__
47 # __IGNORE_WARNING__ __IGNORE_EXCEPTION__ 47 from PyQt6.QtWebEngineCore import QWebEngineUrlScheme
48 WEBENGINE_AVAILABLE = True
49 except ImportError:
50 WEBENGINE_AVAILABLE = False
48 51
49 # some global variables needed to start the application 52 # some global variables needed to start the application
50 args = None 53 args = None
51 mainWindow = None 54 mainWindow = None
52 splash = None 55 splash = None
290 293
291 from Toolbox import Startup 294 from Toolbox import Startup
292 # set the library paths for plugins 295 # set the library paths for plugins
293 Startup.setLibraryPaths() 296 Startup.setLibraryPaths()
294 297
298 if WEBENGINE_AVAILABLE:
299 scheme = QWebEngineUrlScheme(b"qthelp")
300 scheme.setSyntax(QWebEngineUrlScheme.Syntax.Path)
301 scheme.setFlags(QWebEngineUrlScheme.Flag.SecureScheme)
302 QWebEngineUrlScheme.registerScheme(scheme)
303
295 app = EricApplication(sys.argv) 304 app = EricApplication(sys.argv)
296 ddindex = Startup.handleArgs(sys.argv, appinfo) 305 ddindex = Startup.handleArgs(sys.argv, appinfo)
297 306
298 logging.debug("Importing Preferences") 307 logging.debug("Importing Preferences")
299 import Preferences 308 import Preferences

eric ide

mercurial