yes QCoreApplication::aboutToQuit signal get emit , if it normally closed. But I need to handle the unexpected error or crash. Suppose consider the code as
In my main.cpp
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
Widget w;
w.show();
return app.exec();
}
In Widget.cpp :
void Widget:: on_pushButton_clicked()
{
QStringList list;
QString data = list[0]; // index out of range
}
This will cause crash. I need to handle this error by catching the error. Instead of showing the crashing window and i need to show any error messge.
Bookmarks