look at your code again:
try {
MainWindow w;
w.show();
return a.exec();
}
catch (...) {
qDebug() << "CRASH!";
}
try {
QApplication a(argc, argv);
MainWindow w;
w.show();
return a.exec();
}
catch (...) {
qDebug() << "CRASH!";
}
To copy to clipboard, switch view to plain text mode
when execution leaves try block all local variables automatically destroyed, maybe that leads to another exception to be thrown. i think we all know what happens when exception is thrown while there is another unresolved exception... so, try this:
MainWindow w;
w.show();
try {
return a.exec();
}
catch (...) {
qDebug() << "CRASH!";
}
QApplication a(argc, argv);
MainWindow w;
w.show();
try {
return a.exec();
}
catch (...) {
qDebug() << "CRASH!";
}
To copy to clipboard, switch view to plain text mode
Bookmarks