doc: better document the .gitattributes binary file support
[git-cola.git] / qtpy / QtWebEngineWidgets.py
blobd1df5bfbf4ca06b7129cbfeeecc9cac74f60d0ec
1 # -*- coding: utf-8 -*-
3 # Copyright © 2014-2015 Colin Duquesnoy
4 # Copyright © 2009- The Spyder development Team
6 # Licensed under the terms of the MIT License
7 # (see LICENSE.txt for details)
9 """
10 Provides QtWebEngineWidgets classes and functions.
11 """
13 from . import PYQT5,PYSIDE2, PYQT4, PYSIDE, PythonQtError
16 # To test if we are using WebEngine or WebKit
17 WEBENGINE = True
20 if PYQT5:
21 try:
22 from PyQt5.QtWebEngineWidgets import QWebEnginePage
23 from PyQt5.QtWebEngineWidgets import QWebEngineView
24 from PyQt5.QtWebEngineWidgets import QWebEngineSettings
25 except ImportError:
26 from PyQt5.QtWebKitWidgets import QWebPage as QWebEnginePage
27 from PyQt5.QtWebKitWidgets import QWebView as QWebEngineView
28 from PyQt5.QtWebKit import QWebSettings as QWebEngineSettings
29 WEBENGINE = False
30 elif PYSIDE2:
31 from PySide2.QtWebEngineWidgets import QWebEnginePage
32 from PySide2.QtWebEngineWidgets import QWebEngineView
33 from PySide2.QtWebEngineWidgets import QWebEngineSettings
34 elif PYQT4:
35 from PyQt4.QtWebKit import QWebPage as QWebEnginePage
36 from PyQt4.QtWebKit import QWebView as QWebEngineView
37 from PyQt4.QtWebKit import QWebSettings as QWebEngineSettings
38 WEBENGINE = False
39 elif PYSIDE:
40 from PySide.QtWebKit import QWebPage as QWebEnginePage
41 from PySide.QtWebKit import QWebView as QWebEngineView
42 from PySide.QtWebKit import QWebSettings as QWebEngineSettings
43 WEBENGINE = False
44 else:
45 raise PythonQtError('No Qt bindings could be found')