Skip to content
Advertisement

Tag: qwebengineview

Why my PyQt5 Webview Code is not working?

This is my code. Why its not working? Where is my problem? Answer Your code has 2 problems: The QWebEngineView is not a child of the window so it will not be displayed. Change to self.widget = QWebEngineView(Form) QUrl(“google.com”) is not a valid url so you have 2 options, change to: QUrl(“https://google.com”) OR QUrl.fromUserInput(“google.com”)

how to suppress console output from QWebEngineView errors?

I get the following error if I create a QWebEngineView instance from Python instances in different working directories: It seems this is a known issue and will be fixed in QT6: https://bugreports.qt.io/browse/QTBUG-66014 But in the meantime, how can I suppress this message? I tried changing QtCore.qInstallMessageHandler and also x.page().javaScriptConsoleMessage = lambda self, level, msg, line, sourceID: None, neither affected this

Post request by QWebEngineHttpRequest (PyQt5)

I have a question about making POST request in PyQt5. Unfortunately official documentation for this framework for Python doesen’t exist. I have to translate docs from C++ to Python. I have a problem with handle it. To make POST request I have to create instance of class QWebEngineHttpRequest (docs), and then add POST data by setPostData(), it looks to be

Advertisement