Here we call the QApplicaton's quit method whenever the KStandardAction quit is triggered. We are able to access that QApplication method via the qApp macro.