Hi Pierluigi,

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)

as explained by Prem, if you want to add the progress when you call a "native" algorithm of QGIS within your algorithm, then you can pass to the algorithm parameters:

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

be aware also at the `is_child` parameter. Have a look at the example:

https://docs.qgis.org/3.4/en/docs/user_manual/processing/scripts.html#extending-qgsprocessingalgorithm

if you want to add steps to the progressBar with your logic then you can use feedback.setProgress(number) to fill the progress bar. Have a look at the template script and you will find a fine usage

Hope this helps

Matteo
_______________________________________________
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to