I want to enable PrivateBrowsing on PyQt5

Asked 2 years ago, Updated 2 years ago, 167 views

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

2022-09-30 17:34

1 Answers

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/


2022-09-30 17:34

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.