Commit 023168cf authored by Michal Klocek's avatar Michal Klocek
Browse files

Change messagebox in simplebrowser example


In case of render epic fails, let the user
leave the loaded page with dignity.

Change-Id: I27f692fc0bb181c1d4f7ce43f5772d5573d7e385
Reviewed-by: default avatarJoerg Bornemann <joerg.bornemann@qt.io>
Showing with 5 additions and 2 deletions
...@@ -79,8 +79,11 @@ WebView::WebView(QWidget *parent) ...@@ -79,8 +79,11 @@ WebView::WebView(QWidget *parent)
status = tr("Render process killed"); status = tr("Render process killed");
break; break;
} }
QMessageBox::critical(window(), status, tr("Render process exited with code: %1").arg(statusCode)); QMessageBox::StandardButton btn = QMessageBox::question(window(), status,
QTimer::singleShot(0, [this] { reload(); }); tr("Render process exited with code: %1\n"
"Do you want to reload the page ?").arg(statusCode));
if (btn == QMessageBox::Yes)
QTimer::singleShot(0, [this] { reload(); });
}); });
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment