Install & Compatibility
Where this runs
tested against v6.11.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
build_error
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 6.9s · import 0.000s · 544MB
540MB installed
● package 540MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
QWebEngineView
✓ from PyQt6.QtWebEngineWidgets import QWebEngineView
✗ from PyQt6 import QtWebEngineWidgets (or from PyQt5.QtWebEngineWidgets)
In PyQt6, QtWebEngineWidgets is a separate top-level package and needs to be imported explicitly from PyQt6.QtWebEngineWidgets.
QUrl
✓ from PyQt6.QtCore import QUrl
Required for setting URLs in QWebEngineView.
QApplication
✓ from PyQt6.QtWidgets import QApplication
The core application object for any PyQt6 application.
This basic example demonstrates how to embed a QWebEngineView widget within a PyQt6 application to display a web page. It initializes a QApplication, creates a window with a QVBoxLayout, adds a QWebEngineView, and loads Google.com.
import sys
from PyQt6.QtWidgets import QApplication, QWidget, QVBoxLayout
from PyQt6.QtWebEngineWidgets import QWebEngineView
from PyQt6.QtCore import QUrl
app = QApplication(sys.argv)
window = QWidget()
window.setWindowTitle('Simple Web Browser')
window.setGeometry(100, 100, 800, 600)
layout = QVBoxLayout()
window.setLayout(layout)
view = QWebEngineView()
layout.addWidget(view)
# Load a URL
view.setUrl(QUrl('https://www.google.com/'))
window.show()
sys.exit(app.exec())
Debug
Known issues
breakingThe QtWebEngineWidgets module, which was part of the main PyQt5 installation, has been moved to a separate `pyqt6-webengine` package for PyQt6. Direct imports from `PyQt6` (e.g., `from PyQt6 import QtWebEngineWidgets`) will fail if `pyqt6-webengine` is not explicitly installed and imported from `PyQt6.QtWebEngineWidgets`.fixEnsure `pyqt6-webengine` is installed (`pip install PyQt6-WebEngine`) and update imports to `from PyQt6.QtWebEngineWidgets import ...`.
affects: All PyQt6 versions (6.0.0+)
gotchaInitializing QtWebEngine components (like `QWebEngineView`) sometimes requires the `QApplication` instance to be created first. Attempting to import or use `QtWebEngineWidgets` before `QApplication` is set up can lead to `ImportError: DLL load failed` or other unexpected behavior, especially on Windows.fixAlways create your `QApplication` instance at the very beginning of your application's entry point before instantiating `QWebEngineView` or other related classes.
affects: All PyQt6 versions
gotchaUsers have reported performance issues, including flickering, with `QWebEngineView` when displaying WebGL content, particularly on Windows with secondary screens. This appears to be an upstream issue within Qt WebEngine 6.x and was less prevalent in Qt 5.15.fixThere is no direct fix from PyQt6-WebEngine; this is an upstream Qt issue. Consider simplifying WebGL content or exploring alternative rendering methods if this is a critical use case. Testing on different OS/hardware configurations may reveal variations in behavior.
affects: PyQt6-WebEngine 6.x (corresponds to Qt WebEngine 6.x)
gotchaJavaScript errors within `QWebEnginePage` (accessible via `QWebEngineView.page()`) when dealing with web requests, especially authentication systems, can often be traced back to invalid or unrecognized HTTP request headers.fixCarefully review and debug request headers. Removing unnecessary headers or ensuring they conform to expected standards can resolve such JavaScript errors.
affects: All PyQt6-WebEngine versions
breakingIn Qt6 (and thus PyQt6), many short-form enums (e.g., `Qt.Checked`) have been removed. Only the long-form equivalents (e.g., `Qt.CheckState.Checked`) are available. This is a general PyQt6 change but affects any code interacting with Qt APIs, including WebEngine.fixUpdate all enum references to their long-form (scoped) equivalents. Using `enum.Enum` or `enum.IntEnum` is the standard approach.
affects: All PyQt6 versions (6.0.0+)
Upgrade
Version history
6.11.0latest on PyPI · released Mar 30, 2026
Audit
Dependencies
PyQt6requiredPyQt6-WebEngine are Python bindings that sit on top of the PyQt6 framework.
qt6-webenginerequiredUnderlying Qt C++ library required for WebEngine functionality (often handled by PyQt6-WebEngine installation).