Make QWebPage import in commands.py optional

This commit is contained in:
Florian Bruhin 2016-09-05 18:15:30 +02:00
parent 1773c1cbd6
commit bf3cccfe56

View File

@ -28,7 +28,10 @@ from PyQt5.QtWidgets import QApplication, QTabBar
from PyQt5.QtCore import Qt, QUrl, QEvent from PyQt5.QtCore import Qt, QUrl, QEvent
from PyQt5.QtGui import QKeyEvent from PyQt5.QtGui import QKeyEvent
from PyQt5.QtPrintSupport import QPrintDialog, QPrintPreviewDialog from PyQt5.QtPrintSupport import QPrintDialog, QPrintPreviewDialog
from PyQt5.QtWebKitWidgets import QWebPage try:
from PyQt5.QtWebKitWidgets import QWebPage
except ImportError:
QWebPage = None
try: try:
from PyQt5.QtWebEngineWidgets import QWebEnginePage from PyQt5.QtWebEngineWidgets import QWebEnginePage
except ImportError: except ImportError: