garden: use 4-space indents
[git-cola.git] / qtpy / QtWebEngine.py
blob7cc08ff012e3fe916eb3a9875c8986100848a5ea
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",
26 missing_package="PyQtWebEngine",
27 ) from error
28 elif PYQT6:
29 raise QtModuleNotInQtVersionError(name="QtWebEngine")
30 elif PYSIDE2:
31 from PySide2.QtWebEngine import *
32 elif PYSIDE6:
33 raise QtModuleNotInQtVersionError(name="QtWebEngine")