Hey, this may seem like a very simple question, but I want to dump some data whenever the QMainWindow closes, so I used the following piece of code:
QObject::connect(MainWindow.centralwidget, SIGNAL(destroyed()), this, SLOT(close()));
but this doesnt seem to make it call close(). Am I doing this wrong? Isnt the centralwidget suppose to be destroyed? Or perhaps the application closes before close() can be called? Any other ways of doing it then?
Thanks in advance!