Quantcast
Channel: Active questions tagged raster-calculator - Geographic Information Systems Stack Exchange
Viewing all articles
Browse latest Browse all 188

Qgis3 APIbreak : QgsFeedback instead QProgressDialog while using QgsRasterCalculator

$
0
0

I upgraded my Qgis to 3.0.1 and I try to upgrade some of the plugins I wrote.

I have a plugin which uses GDAL/rastercalculator from several raster layers to get new information.

With Qgis2 api it was easy to add a progress dialog to the process :

progress = QProgressDialog("Calcul", "Annuler", 0, 100,self.dockwidget)calc = QgsRasterCalculator(formula, output_path, 'GTiff', map.extent(), map.width(), map.height(), entries)calc.processCalculation(progress)

Qgis3 api uses a QgsFeedback instead of a QProgressDialog (see https://qgis.org/api/api_break.html).

Does anyone know how to use QgsFeedback to create a progress bar ? I couldn't find any example.


Viewing all articles
Browse latest Browse all 188

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>