> Am 04.04.2015 um 22:12 schrieb Michael Jackson <imikejack...@gmail.com>:
> 
> I have a QMainWindow derived application on OS X (10.8.5 if is matters). This 
> app was ported from Qt4 to Qt5 and now I seem to have an issue with my 
> closeEven(..) being called twice. I have implemented the 
> closeEvent(QCloseEvent* event) to capture when the window is closing so that 
> I can call some clean up routines (Writing of settings files mainly). 

Would the signal

 http://doc.qt.io/qt-5/qguiapplication.html#lastWindowClosed

help instead of overwriting ::closeEvent?

You only get it if the /last/ main (top-level) window is (about to get) closed, 
but usually that is sufficient to write application settings (unless you want 
to also store window geometry, that is, /per window/).

Cheers,
 Oliver
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to