I am currently creating my own browser using PyQt5.
In the process, it became necessary to use some QWebSettings (e.g., PrivateBrowsing).
And I tried some of the results I looked up on the Internet, but none of them worked.
from PyQt5.QtWebEngineWidgets import QWebEngineView, QWebEngineSettings
self.webEngineView = QtWebEngineWidgets.QWebEngineView (self.centralwidget)
self.webEngineView.page().settings().WebAttribute(QWebSettings.DeveloperExtrasEnabled, True)
is the last code I tried, but I got an error when I was told that QWebSettings does not exist.
I thought about it, but none of it worked.
How can I use QWebSettings?
python python3 pyqt5 pyqt browser
For PyQt5 5.15 how about installing the PyQtWebEngine
package?
(The command line is as follows)
pip install PyQtWebEngine
Note: https://pypi.org/project/PyQtWebEngine/
© 2024 OneMinuteCode. All rights reserved.