exiting qt when application ends