# Waiting popup (for 3dslicer extension)

**URL:** <https://discourse.slicer.org/t/waiting-popup-for-3dslicer-extension/1965>\
**Category:** Development\
**Created:** [January 29, 2018, 11:00am UTC](https://discourse.slicer.org/t/waiting-popup-for-3dslicer-extension/1965 "2018-01-29T11:00:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frederic](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/frederic/32/4907_2.png) [@Frederic](https://discourse.slicer.org/u/Frederic)\
**Post date:** [January 29, 2018, 11:00am UTC](https://discourse.slicer.org/t/waiting-popup-for-3dslicer-extension/1965/1 "2018-01-29T11:00:05Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![leochan2009](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/leochan2009/32/519_2.png) [@leochan2009](https://discourse.slicer.org/u/leochan2009)\
**Post date:** [January 29, 2018, 1:22pm UTC](https://discourse.slicer.org/t/waiting-popup-for-3dslicer-extension/1965/2 "2018-01-29T13:22:30Z")

</div>

Hi Frederic,

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

Best,  
Longquan

---

<div class="post-metadata">

**Author:** ![Frederic](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/frederic/32/4907_2.png) [@Frederic](https://discourse.slicer.org/u/Frederic)\
**Post date:** [January 29, 2018, 2:10pm UTC](https://discourse.slicer.org/t/waiting-popup-for-3dslicer-extension/1965/3 "2018-01-29T14:10:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![leochan2009](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/leochan2009/32/519_2.png) [@leochan2009](https://discourse.slicer.org/u/leochan2009)\
**Post date:** [January 29, 2018, 2:35pm UTC](https://discourse.slicer.org/t/waiting-popup-for-3dslicer-extension/1965/4 "2018-01-29T14:35:30Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![Frederic](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/frederic/32/4907_2.png) [@Frederic](https://discourse.slicer.org/u/Frederic)\
**Post date:** [January 29, 2018, 3:02pm UTC](https://discourse.slicer.org/t/waiting-popup-for-3dslicer-extension/1965/5 "2018-01-29T15:02:29Z")

</div>

Perfect,  
Thanks a lot!
