From 7db40483aa2edb9be380bae3c90d2f54eae4deb1 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Thu, 21 Aug 2025 12:12:09 +0530 Subject: Close devtools window when webview is closed --- src/widgets/WebView.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/widgets') diff --git a/src/widgets/WebView.cpp b/src/widgets/WebView.cpp index ceb9c8e..1cd3d54 100644 --- a/src/widgets/WebView.cpp +++ b/src/widgets/WebView.cpp @@ -24,6 +24,11 @@ void WebView::open_devtools() { devtools_window = nullptr; }); + connect(this, &WebView::destroyed, this, [this]() { + devtools_window->deleteLater(); + devtools_window = nullptr; + }); + page()->setDevToolsPage(devtools_window->page()); } -- cgit v1.3.1