Quantcast
Channel: QtWebEngine
Viewing all articles
Browse latest Browse all 13965

QMessageBox after qApp->exec();

$
0
0
Hellop, i have segmantation fault error. Can i do in Qt something like this: main.cpp int main(int argc, char** argv) {     QApplication app(argc, argv);       MainWindow* mainWindow = new MainWindow;     //some code     int rc = app.exec();       delete mainWindow;       if(rc==2)     {         QMessageBox::critical(NULL, "CriticalError", "something wrong", QMessageBox::Ok | QMessageBox::Default, QMessageBox::Escape);     }     if(rc==3)     {         QMessageBox::critical(NULL, "CriticalError", "something else wrong", QMessageBox::Ok | QMessageBox::Default, QMessageBox::Escape);     }     return rc; } I want to call qApp->exit(error_code) in my classes, and then all my classes have to destruct and only message box appear and show until user didn’t close it. Sorry for my English…

Viewing all articles
Browse latest Browse all 13965

Latest Images

Trending Articles



Latest Images