Class: QgsProxyProgressTask

A QgsTask shell which proxies progress reports.

Simple task shell which runs until finalized and reports progress only. This is usually used to expose a blocking operation’s progress via task manager.

Added in version 3.4.

Class Hierarchy

Inheritance diagram of qgis.core.QgsProxyProgressTask

Base classes

QgsTask

Abstract base class for long running background tasks.

QObject

class qgis.core.QgsProxyProgressTask[source]

Bases: QgsTask

__init__(description: str | None, canCancel: bool = False)

Constructor for QgsProxyProgressTask, with the specified description.

Parameters:
  • description (Optional[str])

  • canCancel (bool = False)

signal canceled[source]

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

finalize(self, result: bool)[source]

Finalizes the task, with the specified result.

This should be called when the operation being proxied has completed, to remove this proxy task from the task manager.

Parameters:

result (bool)

setProxyProgress(self, progress: float)[source]

Sets the progress (from 0 to 100) for the proxied operation.

This method is safe to call from the main thread.

Parameters:

progress (float)