[Qt-interest] QMainWindow close signal

NARCISO, Rui RUI.NARCISO at airbus.com
Wed Mar 25 14:17:03 CET 2009


In the same line of question, how to detect that a window was closed by means of the small "cross" icon on the top left corner of the window contrarily to a clean close by means of a "quit" button ?


-----Message d'origine-----
De : qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com]De la part de Denton Vis
Envoyé : mercredi 25 mars 2009 14:00
À : qt-interest at trolltech.com
Objet : Re: [Qt-interest] QMainWindow close signal


Also, if you want to know when the last visible primary window in your app 
is closing, you could use:
void QApplication::lastWindowClosed ()   [signal]

http://doc.trolltech.com/4.5/qapplication.html#lastWindowClosed


"Juan D Guzman" <lostinthecode at googlemail.com> wrote in message 
news:49C91AD9.4030603 at gmail.com...
> I was wondering if there is a signal that I can hook into on the window 
> close event?  Or should I just put my code in the destructor for the 
> window?
>
> I looked into the QMainWindow docs and saw none.  I'm suspecting that 
> putting my code in the destructor will give me the same effect but coming 
> from C# i'm used to catching the close event.
>
> Cheers,
>
> JD 

_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest

This mail has originated outside your organization, either from an external partner or the Global Internet.
Keep this in mind if you answer this message.



The information in this e-mail is confidential. The contents may not be disclosed or used by anyone other then the addressee. Access to this e-mail by anyone else is unauthorised.
If you are not the intended recipient, please notify Airbus immediately and delete this e-mail.
Airbus cannot accept any responsibility for the accuracy or completeness of this e-mail as it has been sent over public networks. If you have any concerns over the content of this message or its Accuracy or Integrity, please contact Airbus immediately.
All outgoing e-mails from Airbus are checked using regularly updated virus scanning software but you should take whatever measures you deem to be appropriate to ensure that this message and any attachments are virus free.





More information about the Qt-interest-old mailing list