I have no idea why you would have program 1 launch program 2 just to display a dialog when there is a clear an obvious way to use the dialog inline... but it's your party.
To achieve what you are asking you would need the launching program to call setDisabled(true) on its top-level window, launch the second program, and wait from the termination of the called program before calling setEnabled(true). The second program should be written to be always on-top. The Qt::WindowStaysOnTopHint window flag is one way you might be able to do this.
thanks for the way you mentioned. about the first 2 lines, I do not want the first program to launch the second. But, unfortunately, the way the code behaves is like that.
Bookmarks