I have a small dialog with a progress bar. The dialog is opened from a separate thread and gets, as the parent, the main window. The problem is, when I click on the main window, it comes to the front, but not the child dialog.
The child dialog can not be modal, otherwise the thread wouldn't continue. So how can I properly parent the windows, so that, when I click on the main window, the dialog is shown. Maybe the dialog should be opened from the main window? But then the main window would be blocked.
What I would have is, to block the main window operation until the thread is finished, the main window should still be responsive, so I can stop the thread, and the thread (or somebody) should update the progress dialog while running.
Any advice how to set this up?