Hide ThreadWithProgressWindow


As the title says, is there anyway to hide the window sometimes with ThreadWithProgressWindow? I want to reuse the work done in my ThreadWithProgressWindow elsewhere but not show window.

getAlertWindow()->setVisible(false); doesn't seem to work...


Are you using the ThreadWithProgressWindow modally (i.e. using the ThreadWithProgressWindow::runThread method)? I’m not sure you can hide the alert window if the message thread is blocked by the modal window.

Hold on, is runThread modal and launchThread not? Because in the documentation it seems that launchThread is the one that has the modal state (I’m guessing they both are).


In any case there’s no way to initiate the ThreadWithProgressWindow silently? As in not even hide it but not have it in the first place?


Sorry, my answer was really confusing. runThread will block, where launchThread will return immediately. But you are right, both are modal.

Can you hide the window immediately after calling launchThread?

Actually, I just realised that you can call ThreadWithProgressWindow’s thread directly, without initiating runThread (using startThread).

This seems to work!

Thanks Fabian for your discussion.