Thanks a lot for this, Nyall. It works a treat!


I did notice a curious behavior, though.  The stdout callback seems to only be 
called every so often, and there doesn't seem to be a control for that in the 
documentation for the relevant objects. Did I miss anything?



Cheers,

Pedro










---- On Mon, 27 May 2024 18:12:33 +1000 Nyall Dawson <nyall.daw...@gmail.com> 
wrote ---





On Mon, 27 May 2024, 5:54 pm Pedro Camargo via QGIS-Developer, 
<mailto:qgis-developer@lists.osgeo.org> wrote:

Hello fellow QGIS'ers.

I have a (new to me) problem in my hands.

I am building an interface to run a large transportation simulation model 
(https://polaris.taps.anl.gov/polaris-studio/index.html) from a QGIS plugin, 
and I would like to update the interface as the simulation progresses.

The issue here is that this simulation is done inside a compiled C++ executable 
from which I cannot emit any QT signals, so I have to do it "manually" by 
processing the logfile generated by the application.

I currently don't see a way to do this, as the calling the simulation processes 
captures the GIL and I can't update the interface, but is there another way of 
doing this?



I am at a bit of a loss, so I appreciate any pointers.








I'd suggest following the approach used by the GDAL processing algorithms. See



https://github.com/qgis/QGIS/blob/master/python/plugins/processing/algs/gdal/GdalUtils.py#L146



Nyall









Cheers,

Pedro




_______________________________________________
 QGIS-Developer mailing list
 mailto:QGIS-Developer@lists.osgeo.org
 List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
 Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
_______________________________________________
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