Mnescat
0
Q:

qwebengine download

void MainWindow::downloadRequested(QWebEngineDownloadItem* download) {
        if (download->savePageFormat() != QWebEngineDownloadItem::UnknownSaveFormat)  {
            qDebug() << "Format: " <<  download->savePageFormat();
            qDebug() << "Path: " << download->path();
            // If you want to modify something like the default path or the format
            download->setSavePageFormat(...);
            download->setPath(...);
            // Check your url to accept/reject the download
            download->accept();
        }
}
0
    connect(webView->page()->profile(), SIGNAL(downloadRequested(QWebEngineDownloadItem*)),
                this, SLOT(downloadRequested(QWebEngineDownloadItem*)));
0

New to Communities?

Join the community