PyQt5 QWebEngineView does not show webpage

Jean-Baptiste Peter jbpeter at
Fri Sep 16 10:03:17 BST 2022


I wrote small script which creates a qwebengineview in a qdialog. When I run it, there is a white flash and then the dialog looks completely empty. The webengineview seems to be initialized as it is possible to call its methods such as .url().

I found a few post describing a similar issue but didn't find any solution as of now:

Here is my script :

from PyQt5.QtWebEngineWidgets import QWebEngineView
from PyQt5 import QtWidgets
from PyQt5.QtCore import QUrl
dlg = QtWidgets.QDialog()
view = QWebEngineView()
layout = QtWidgets.QHBoxLayout()
layout.setContentsMargins(0, 0, 0, 0)
url = QUrl("")

My configuration:
Windows 11
PyQt5 5.15.4
PyQt5-sip 12.9.0
PyQtWebEngine 5.15.5

Do you have any idea what could be the problem? Thank you,


Jean-Baptiste PETER

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the PyQt mailing list