I have always problems to close my Qt applications properly. What should one take care of when quitting from a Qt::Application? I want to compile a check-list that I can follow to exit all parts properly, depending what functionalities the program uses. For example, if I use QThreads, what needs to done to make sure they are shut down properly, and so on with all other parts that might need special care.
I hope I am not the only one having such problems and it turns out to be useful for many.
There is no checklist beyond proper C++ design. A QThread doesn't, unfortunately, offer any sane default destruction behaviors. In C++ land, that's nominally a no-no. You need some QObject that owns your threads and, before vanishing itself, takes care to either quit or terminate them, followed by waiting on them before they get destroyed. Same goes for all the classes that you wrote yourself: they must act properly when destructed. Qt generally acts appropriately when the instances of its various classes are deleted, QThread is really a standout.
Once you follow the base tenet of C++ design, namely that objects release resources upon destruction, you won't have any problems. Use smart pointers, including C++11 if available. QPointer, QSharedPointer, QScopedPointer are all your friends.
Qt: Quit application -> checklist for proper clean up