[Qt-interest] Quit vs. Close window
Israel Brewster
israel at frontierflying.com
Tue Dec 30 18:12:27 CET 2008
That should work, thanks. I was thinking there would be some built-in
way to tell the difference, such as a signal emitted when the close
button is pressed, or a flag set in the close event, but this should
be a fairly easy to implement work-around. Thanks again!
-----------------------------------------------
Israel Brewster
Computer Support Technician
Frontier Flying Service Inc.
5245 Airport Industrial Rd
Fairbanks, AK 99709
(907) 450-7250 x293
-----------------------------------------------
On Dec 29, 2008, at 7:01 PM, Tony Rietwyk wrote:
> Hi Israel,
>
> I just set a flag in my File / Exit action, and test it in the
> CloseEvent override.
>
> Hope that helps,
>
> Tony Rietwyk
>
> -----Original Message-----
> From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com
> ] On Behalf Of Israel Brewster
> Sent: Tuesday, 30 December 2008 11:19
> To: Deepak Chandran
> Cc: Qt Interest
> Subject: Re: [Qt-interest] Quit vs. Close window
>
> On Dec 29, 2008, at 2:31 PM, Deepak Chandran wrote:
>
>> I did this by overwriting the closeEvent in QMainWindow
>
> Thanks for the response. Unfortunately, as I mentioned in my second
> sentence, I have already tried that. To reiterate, the problem with
> that approach is that the closeEvent is called when the window is
> closed due to application exit as well as when the user closes the
> window. I don't want the routines in question to run on application
> exit - only on window close.
>
> -----------------------------------------------
> Israel Brewster
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20081230/b2fc0e42/attachment.html
More information about the Qt-interest-old
mailing list