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 QtWebEngineWidgets classes and functions."""
16 QtModuleNotInstalledError
,
19 # To test if we are using WebEngine or WebKit
20 # NOTE: This constant is imported by other projects (e.g. Spyder), so please
27 # Based on the work at https://github.com/spyder-ide/qtpy/pull/203
28 from PyQt5
.QtWebEngineWidgets
import (
35 except ModuleNotFoundError
as error
:
36 raise QtModuleNotInstalledError(
37 name
="QtWebEngineWidgets",
38 missing_package
="PyQtWebEngine",
42 from PyQt6
.QtWebEngineCore
import (
48 from PyQt6
.QtWebEngineWidgets
import *
49 except ModuleNotFoundError
as error
:
50 raise QtModuleNotInstalledError(
51 name
="QtWebEngineWidgets",
52 missing_package
="PyQt6-WebEngine",
55 # Based on the work at https://github.com/spyder-ide/qtpy/pull/203
56 from PySide2
.QtWebEngineWidgets
import (
64 from PySide6
.QtWebEngineCore
import (
70 from PySide6
.QtWebEngineWidgets
import *