Skip to content

Commit fa7ee58

Browse files
committed
Fixing crash on Windows launch (with no WebEngineView)
1 parent e92ae96 commit fa7ee58

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/classes/app.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,12 @@
3939
from PyQt5.QtGui import QPalette, QColor, QFontDatabase, QFont
4040
from PyQt5.QtWidgets import QApplication, QStyleFactory, QMessageBox
4141

42-
# QtWebEngineWidgets must be loaded prior to creating a QApplication
43-
from PyQt5.QtWebEngineWidgets import QWebEngineView
42+
try:
43+
# QtWebEngineWidgets must be loaded prior to creating a QApplication
44+
# But on systems with only WebKit, this will fail (and we ignore the failure)
45+
from PyQt5.QtWebEngineWidgets import QWebEngineView
46+
except ImportError:
47+
pass
4448

4549
try:
4650
# Solution to solve QtWebEngineWidgets black screen caused by OpenGL not loaded

0 commit comments

Comments
 (0)