[QGIS-Developer] process bar in processing algs

Prem Kumar prem.netgis at gmail.com
Tue Jul 20 02:37:27 PDT 2021


Hi Mate,

Every processing tool has to implement its business logic in
processAlgorithm() function and it has below syntax.

*def processAlgorithm(self, parameters, context, feedback):*

One of the input parameters is feedback and this as a parameter variable
should be given to the *processing.run()* function as shown below.

Hope, this helps.

result_grid = processing.run("native:creategrid", params_creategrid*,
context=context, feedback=feedback*)


On Tue, Jul 20, 2021 at 2:45 PM pierluigi de rosa <
pierluigi.derosa at gmail.com> wrote:

> Hi Matteo,
> can you please explain me better?
> I have self plugin that in particular part use this code
>
> result_grid = processing.run("native:creategrid", params_creategrid)
>
> But I would like to use note the progressBar of processing but a personal
> bar in the QDialog
>
> It is possible?
> P
>
> Il giorno mar 20 lug 2021 alle ore 11:01 matteo <matteo.ghetta at gmail.com>
> ha scritto:
>
>> Hi Pierluigi,
>>
>> you can fill the progressBar of the Processing algorithm with
>> feedback.setProgress(integer).
>>
>> Hope this helps
>>
>> Matteo
>>
>
>
> --
> Ing. Pierluigi De Rosa (PhD in Earth Science)
> Contract Professor of Geographic Information System at University of
> Perugia
> cel: 3497558268 / fax: 075 7823038
> skype: pierluigi.derosa
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20210720/6f36ae67/attachment.html>


More information about the QGIS-Developer mailing list