Waiting popup (for 3dslicer extension)

Hi all,

I am creating 3dslicer module. It’s why I would know if you already have developed a “waiting popup” to indicate that calculating is occurring?

Thanks in advance.

Hi Frederic,

Try use this function: slicer.util.createProgressDialog()

Best,
Longquan

Thanks a lot @leochan2009 !
Do you have an example of how this function works please?
It’s displayed after the calculating to me.

Hi,
progressBar=slicer.util.createProgressDialog()
progressBar.labelText = 'Calculating step 1’
slicer.app.processEvents()

Some algorithm calculation 1

progressBar.value = 25
progressBar.labelText = 'Calculating step 2’
slicer.app.processEvents()

Some algorithm calculation 2

for some cli module, you should be able to get the current progress and update the progress bar value.
but for loadable modules, i am not sure the proper way to get the progress…

1 Like

Perfect,
Thanks a lot!