From 3f56d76a2b0d528c05ab8d0a38059ca82ba90952 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sat, 26 Jul 2025 00:39:23 +0530 Subject: Add set_html for views + example use with decorations --- 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 45d9c88..698cb88 100644 --- a/src/widgets/WebViewStack.cpp +++ b/src/widgets/WebViewStack.cpp @@ -318,3 +318,13 @@ void WebViewStack::scroll_to_bottom(WebViewId webview_id) { webview->scroll_to_bottom(); } + +void WebViewStack::set_html(const QString &html, WebViewId webview_id) { + auto *webview = get_webview(webview_id); + if (webview == nullptr) { + qDebug() << "Webview does not exist"; + return; + } + + webview->setHtml(html); +} -- cgit v1.3.1