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

Hi,

I run a CLI module in the background in a customized loadable scripted module. And following here How to update the progress bar from a scripted CLI - #2 by strider_hunter, I create a progressDialog to show the progress.

Now I would like to know when the user clicks the cancel button of the progress bar so I can call cliNode.cancel() to kill the process of the CLI module. I checked the Status of clicking cancel but it is the same with interpreting the XML file (both are 2). So I am wondering how can I achieve this goal?

Thanks!

Hi,

maybe this link helps:

see the usage of progress.wasCanceled

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

Best
Rudolf

Hi Rudolf,

Thanks for the point. I didn’t make it work through wasCanceled. But I create another button for the GUI to cancel the process through cli_node.Cancel(), which works perfectly.