summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/gui
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2017-08-14 17:59:04 -0400
committerKali Kaneko <kali@leap.se>2017-08-14 18:10:48 -0400
commitb966691277d224700e54d3bd489dc76adbe2243a (patch)
treef80e203c9d899ceda00301f507c6cf2ea3b83a70 /src/leap/bitmask/gui
parentde7d7f9dbb11eefe03c33ee62b307d784be8d44c (diff)
[pkg] fallback to pyqt-webkit if webengine not found
Diffstat (limited to 'src/leap/bitmask/gui')
-rw-r--r--src/leap/bitmask/gui/app.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/leap/bitmask/gui/app.py b/src/leap/bitmask/gui/app.py
index afa914c7..3d380bc3 100644
--- a/src/leap/bitmask/gui/app.py
+++ b/src/leap/bitmask/gui/app.py
@@ -38,21 +38,21 @@ from leap.common.config import get_path_prefix
if platform.system() == 'Windows':
from multiprocessing import freeze_support
from PySide import QtCore, QtGui
- #from PySide import QtWebKit
from PySide.QtGui import QDialog
from PySide.QtGui import QApplication
from PySide.QtWebKit import QWebView, QGraphicsWebView
from PySide.QtCore import QSize
else:
from PyQt5 import QtCore, QtGui
- #from PyQt5 import QtWebEngine
from PyQt5.QtCore import QSize
from PyQt5.QtCore import QObject, pyqtSlot
from PyQt5.QtWidgets import QApplication
- #from PyQt5.QtWebKitWidgets import QWebView
- #from PyQt5.QtWebKit import QWebSettings
- from PyQt5.QtWebEngineWidgets import QWebEngineView as QWebView
- from PyQt5.QtWebEngineWidgets import QWebEngineSettings as QWebSettings
+ try:
+ from PyQt5.QtWebKitWidgets import QWebView
+ from PyQt5.QtWebKit import QWebSettings
+ except ImportError:
+ from PyQt5.QtWebEngineWidgets import QWebEngineView as QWebView
+ from PyQt5.QtWebEngineWidgets import QWebEngineSettings as QWebSettings
IS_WIN = platform.system() == "Windows"