File: QtWebEngine.py

package info (click to toggle)
git-cola 4.13.0-1
  • links: PTS
  • area: main
  • in suites: sid
  • size: 6,480 kB
  • sloc: python: 36,938; sh: 304; makefile: 223; xml: 100; tcl: 62
file content (33 lines) | stat: -rw-r--r-- 946 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# -----------------------------------------------------------------------------
# Copyright © 2014-2015 Colin Duquesnoy
# Copyright © 2009- The Spyder development Team
#
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)
# -----------------------------------------------------------------------------

"""Provides QtWebEngine classes and functions."""

from . import (
    PYQT5,
    PYQT6,
    PYSIDE2,
    PYSIDE6,
    QtModuleNotInQtVersionError,
    QtModuleNotInstalledError,
)

if PYQT5:
    try:
        from PyQt5.QtWebEngine import *
    except ModuleNotFoundError as error:
        raise QtModuleNotInstalledError(
            name="QtWebEngine",
            missing_package="PyQtWebEngine",
        ) from error
elif PYQT6:
    raise QtModuleNotInQtVersionError(name="QtWebEngine")
elif PYSIDE2:
    from PySide2.QtWebEngine import *
elif PYSIDE6:
    raise QtModuleNotInQtVersionError(name="QtWebEngine")