CHANGES: remove dead link to now-removed cola.compat.hashlib
[git-cola.git] / qtpy / QtWebEngine.py
blobc5c80d5276af9769c15549dffbe1e840b22ff7c4
1 # -----------------------------------------------------------------------------
2 # Copyright © 2014-2015 Colin Duquesnoy
3 # Copyright © 2009- The Spyder development Team
5 # Licensed under the terms of the MIT License
6 # (see LICENSE.txt for details)
7 # -----------------------------------------------------------------------------
9 """Provides QtWebEngine classes and functions."""
11 from . import (
12 PYQT5,
13 PYQT6,
14 PYSIDE2,
15 PYSIDE6,
16 QtModuleNotInQtVersionError,
17 QtModuleNotInstalledError,
20 if PYQT5:
21 try:
22 from PyQt5.QtWebEngine import *
23 except ModuleNotFoundError as error:
24 raise QtModuleNotInstalledError(
25 name='QtWebEngine', missing_package='PyQtWebEngine'
26 ) from error
27 elif PYQT6:
28 raise QtModuleNotInQtVersionError(name='QtWebEngine')
29 elif PYSIDE2:
30 from PySide2.QtWebEngine import *
31 elif PYSIDE6:
32 raise QtModuleNotInQtVersionError(name='QtWebEngine')