From 1860c787e167d1c08e71b15de41ebe7a6b5d0c29 Mon Sep 17 00:00:00 2001 From: link2xt Date: Sat, 22 May 2021 15:23:16 +0300 Subject: Add HTML view for messages --- qml/HtmlViewSheet.qml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 qml/HtmlViewSheet.qml (limited to 'qml/HtmlViewSheet.qml') diff --git a/qml/HtmlViewSheet.qml b/qml/HtmlViewSheet.qml new file mode 100644 index 0000000..03e0147 --- /dev/null +++ b/qml/HtmlViewSheet.qml @@ -0,0 +1,23 @@ +import QtQuick 2.12 +import QtWebEngine 1.10 + +import org.kde.kirigami 2.12 as Kirigami + +Kirigami.OverlaySheet { + property string subject + property string html + + header: Kirigami.Heading { + text: subject + } + + WebEngineView { + id: web + height: 500 + } + + onHtmlChanged: { + console.log("Loading HTML!") + web.loadHtml(html) + } +} -- cgit v1.2.3-70-g09d2