webView QML中的身份验证

Authentification in the webView QML

本文关键字:身份验证 QML webView      更新时间:2023-10-16

我试图使用webkit在qml中显示网页,但我找不到语法来访问包含登录名和密码的页面

下面是一段代码:
 Rectangle {
   id: webBrowser
   property string urlString : "http://website.com/"
   //
 }

谢谢。

要验证http请求,将viewer.engine()->networkAccessManager() authenticationRequired信号连接到您的插槽,您可以设置QAuthenticator名称和密码字段。