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.