Class: QgsImageFetcher

Handles asynchronous download of images

Class Hierarchy

Inheritance diagram of qgis.core.QgsImageFetcher

Base classes

QObject

Methods

start

Starts the image download

Signals

error

Emitted when an error occurs

finish

Emitted when the download completes

progress

Emitted to report progress

class qgis.core.QgsImageFetcher[source]

Bases: QObject

__init__(parent: QObject | None = None)

Constructor

Parameters:

parent (Optional[QObject] = None)

signal error(msg: str)[source]

Emitted when an error occurs

Parameters:

msg (str)

signal finish(legend: QImage)[source]

Emitted when the download completes

Parameters:

legend (QImage) – The downloaded legend image

signal progress(received: int, total: int)[source]

Emitted to report progress

Parameters:
  • received (int)

  • total (int)

start(self)[source]

Starts the image download

Note

Make sure to connect to “finish” and “error” before starting