From 350d2bd7ccf80b91abdff154344f0ce88080a195 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sun, 16 Mar 2025 14:39:57 +0530 Subject: Add tab selector listing and evaluation --- src/widgets/WebViewStack.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/widgets') diff --git a/src/widgets/WebViewStack.cpp b/src/widgets/WebViewStack.cpp index 0d1f7fc..b825623 100644 --- a/src/widgets/WebViewStack.cpp +++ b/src/widgets/WebViewStack.cpp @@ -45,6 +45,13 @@ QWebEngineView *WebViewStack::createNewWebView(QUrl url, bool focus) { return webview; } +QList WebViewStack::getTabList() { + QList urls; + for (auto &view : webViewList) + urls.append((Tab){.url = view->url().toString(), .title = view->title()}); + return urls; +} + void WebViewStack::onNewWebViewRequest(QWebEngineNewWindowRequest &request) { switch (request.destination()) { case QWebEngineNewWindowRequest::InNewTab: -- cgit v1.3.1