Thanks! Nice article and solution.
void MyGlWidget::initializeGL() {
try {
throw std::exception();
} catch(...) {
getExceptionMessage(&exception_msg_);
"Exception",
exception_msg_,
this);
msgbox->open(0, 0);
}
}
void MyGlWidget::initializeGL() {
try {
throw std::exception();
} catch(...) {
getExceptionMessage(&exception_msg_);
QMessageBox *msgbox = new QMessageBox(QMessageBox::Warning,
"Exception",
exception_msg_,
QMessageBox::Ok,
this);
msgbox->open(0, 0);
}
}
To copy to clipboard, switch view to plain text mode
Don't forget to use "new QMessageBox", because "QMessageBox msgbox;" will be deleted on scope exit. open() doesn't block the execution.
Bookmarks