I am trying this :
ui->webView->setPage(webPage);
// ui->webView->load(url);
manager=ui->webView->page()->networkAccessManager();
connect(manager,SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)),this,SLOT(provideAuthentication(QNetworkReply*,QAuthenticator*)));
QNetworkRequest req(url);
manager->get(req);
ui->webView->setPage(webPage);
QUrl url(QString("http://localhost/text/"));
// ui->webView->load(url);
manager=ui->webView->page()->networkAccessManager();
connect(manager,SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)),this,SLOT(provideAuthentication(QNetworkReply*,QAuthenticator*)));
QNetworkRequest req(url);
manager->get(req);
To copy to clipboard, switch view to plain text mode
void Example::provideAuthentication(QNetworkReply *reply, QAuthenticator *auth)
{
auth->setUser("admin");
auth->setPassword("admin");
}
void Example::provideAuthentication(QNetworkReply *reply, QAuthenticator *auth)
{
auth->setUser("admin");
auth->setPassword("admin");
}
To copy to clipboard, switch view to plain text mode
But nothing displays neither the warning authentication required....
Bookmarks