summaryrefslogtreecommitdiff
path: root/Tools/QtTestBrowser/launcherwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/QtTestBrowser/launcherwindow.cpp')
-rw-r--r--Tools/QtTestBrowser/launcherwindow.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/Tools/QtTestBrowser/launcherwindow.cpp b/Tools/QtTestBrowser/launcherwindow.cpp
index 1321760f8..3d3414272 100644
--- a/Tools/QtTestBrowser/launcherwindow.cpp
+++ b/Tools/QtTestBrowser/launcherwindow.cpp
@@ -592,6 +592,16 @@ bool LauncherWindow::isGraphicsBased() const
return bool(qobject_cast<QGraphicsView*>(m_view));
}
+void LauncherWindow::closeEvent(QCloseEvent* e)
+{
+ e->ignore();
+ auto c = connect(page(), &QWebPage::windowCloseRequested, this, [e]() {
+ e->accept();
+ });
+ page()->triggerAction(QWebPage::RequestClose);
+ disconnect(c);
+}
+
void LauncherWindow::sendTouchEvent()
{
if (m_touchPoints.isEmpty())