From a9d767b209c503ac7b5dff5132aa213d47dcb608 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sat, 19 Apr 2025 18:43:32 +0530 Subject: Add web.view.open_devtools for opening devtools --- src/widgets/WebViewStack.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/widgets/WebViewStack.cpp') diff --git a/src/widgets/WebViewStack.cpp b/src/widgets/WebViewStack.cpp index 16fd3e9..9eef92a 100644 --- a/src/widgets/WebViewStack.cpp +++ b/src/widgets/WebViewStack.cpp @@ -199,6 +199,16 @@ void WebViewStack::focus_webview(WebViewId webview_id) { layout->setCurrentIndex((int)webview_index); } +void WebViewStack::open_devtools(WebViewId webview_id) { + auto *webview = get_webview(webview_id); + if (webview == nullptr) { + qDebug() << "Webview does not exist"; + return; + } + + webview->open_devtools(); +} + void WebViewStack::set_search_text(const QString &text, WebViewId webview_id, bool forward) { auto *webview = get_webview(webview_id); if (webview == nullptr) { -- cgit v1.3.1