# Cancel CLI module running from a loadable scripted module through clicking the cancel button of qProgressDialog

**URL:** <https://discourse.slicer.org/t/cancel-cli-module-running-from-a-loadable-scripted-module-through-clicking-the-cancel-button-of-qprogressdialog/18330>\
**Category:** Support\
**Tags:** python, cli\
**Created:** [June 24, 2021, 5:35pm UTC](https://discourse.slicer.org/t/cancel-cli-module-running-from-a-loadable-scripted-module-through-clicking-the-cancel-button-of-qprogressdialog/18330 "2021-06-24T17:35:45Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![rbumm](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rbumm/32/9404_2.png) [@rbumm](https://discourse.slicer.org/u/rbumm)\
**Post date:** [June 24, 2021, 6:52pm UTC](https://discourse.slicer.org/t/cancel-cli-module-running-from-a-loadable-scripted-module-through-clicking-the-cancel-button-of-qprogressdialog/18330/2 "2021-06-24T18:52:12Z")

</div>

Hi,

maybe this link helps:

> [@Use progress bar from python](https://discourse.slicer.org/t/use-progress-bar-from-python/4343/2):
>
> You can use this convenience function for that See example of usage here

see the usage of `progress.wasCanceled`

In my extension, I only use the naked progressbar without the Cancel button.

Best  
Rudolf

---

_[View the full topic](https://discourse.slicer.org/t/cancel-cli-module-running-from-a-loadable-scripted-module-through-clicking-the-cancel-button-of-qprogressdialog/18330)._
