isamert
28th July 2010, 14:15
Hi!
I would like add to my webbrowser download manager option. I added QWebView into Form and I added this code:
connect(ui->webView->page(), SIGNAL(downloadRequested(QNetworkRequest)), this, SLOT(downloadRequested(QNetworkRequest)));
void MainWindow::downloadRequested(const QNetworkRequest &request)
{
downloadmanager *dm = new downloadmanager();
dm.append(request.url().toString());
dm.show();
}
But when I click on the link with file it doesn't work, It works only when I right-click on link and choose "save link"
I tried this code but the result is same.
connect(ui->webView->page(), SIGNAL(downloadRequested(const QNetworkRequest&)), this, SLOT(downloadRequested(const QNetworkRequest&)));
Sorry for my poor English.
I would like add to my webbrowser download manager option. I added QWebView into Form and I added this code:
connect(ui->webView->page(), SIGNAL(downloadRequested(QNetworkRequest)), this, SLOT(downloadRequested(QNetworkRequest)));
void MainWindow::downloadRequested(const QNetworkRequest &request)
{
downloadmanager *dm = new downloadmanager();
dm.append(request.url().toString());
dm.show();
}
But when I click on the link with file it doesn't work, It works only when I right-click on link and choose "save link"
I tried this code but the result is same.
connect(ui->webView->page(), SIGNAL(downloadRequested(const QNetworkRequest&)), this, SLOT(downloadRequested(const QNetworkRequest&)));
Sorry for my poor English.