So Im making a QT application and Im trying to figure out how to properly shut it down when the x is clicked. I have a loop running and if the x is clicked the GUI will disappear while but the program keeps running until the loop ends. Calling delete on the object with the loop just stops the loop but doesnt stop the application.
So what is the best with of dealing with shut down. I assume its going to be using the closeEvent slot in some form.