We have a large Qt 4.8.5 Windows desktop C++ / QWidget application which prints some information to standard out. That shows a terminal window. Unfortunately, clicking the Close-Window ("X") title-bar button on that terminal window ABORTS the entire application!
We need to prevent that, EITHER BY preventing the terminal window closure -- OR at least by preventing the effect of that closure killing our application.
Of course, in Qt, clicking that Close-Window ("X") button in a QWidget’s window can be ignored by intercepting and calling ignore() on the QCloseEvent. I don’t imagine that is relevant to the terminal window’s close-window button.
Is there some Windows event handler (or something) we can define to consume that event? (or something) to prevent that window from closing, or at least prevent the application from exiting when that terminal window is closed?
Or, as a last ditch can we force a message like "CLOSING THIS WINDOW WILL ABORT (THE APPLICATION) !!!" onto the standard-out terminal window's title bar? (But what we really want is the right solution).
(We’re using Visual Studio 2010, mostly Windows 7).
Thank you in advance. – Phil
Bookmarks