Use progress bar from python

The python code in my logic class can take some time to finish its calculations. I would like to add a progress bar in the UI. Is there any way to work with a progressbar info from python?

You can use this convenience function for that

See example of usage here

1 Like

Thanks! My guess is that updating the progress object from inside the python logic is not good practice right. Do I have stick to widget space for this?

In Python scripted modules, we typically add callback functions in the logic class to provide real-time feedback to widget (or any other component that uses the logic class). See for example how it is done in DICOM Patcher module.