Class: QgsFileDownloaderDialog

QgsFileDownloaderDialog is a QProgressDialog subclass which handles file downloads and user feedback.

Internally, it uses QgsFileDownloader to handle the download, while showing progress via a progress dialog and supporting cancellation.

Note

Until QGIS 3.0 this functionality was available via QgsFileDownloader.

Class Hierarchy

Inheritance diagram of qgis.gui.QgsFileDownloaderDialog

Base classes

QProgressDialog

QDialog

QWidget

QObject

QPaintDevice

Signals

downloadCanceled

Emitted when the download was canceled by the user

downloadCompleted

Emitted when the download has completed successfully

downloadError

Emitted when an error makes the download fail

downloadExited

Emitted always when the downloader exits

downloadProgress

Emitted when data are ready to be processed

class qgis.gui.QgsFileDownloaderDialog[source]

Bases: QProgressDialog

__init__(url: QUrl, outputFileName: str | None, authcfg: str | None = '')

QgsFileDownloader

Parameters:
  • url (QUrl) – the download url

  • outputFileName (Optional[str]) – file name where the downloaded content will be stored

  • authcfg (Optional[str] = '') – optionally apply this authentication configuration

signal downloadCanceled[source]

Emitted when the download was canceled by the user

signal downloadCompleted[source]

Emitted when the download has completed successfully

signal downloadError(errorMessages: List[str])[source]

Emitted when an error makes the download fail

Parameters:

errorMessages (List[str])

signal downloadExited[source]

Emitted always when the downloader exits

signal downloadProgress(bytesReceived: int, bytesTotal: int)[source]

Emitted when data are ready to be processed

Parameters:
  • bytesReceived (int)

  • bytesTotal (int)