From ea443f175ece1cd86cf56458a6bd2faedcfb8426 Mon Sep 17 00:00:00 2001 From: Michael Bohlender Date: Thu, 17 Dec 2015 21:17:52 +0100 Subject: display loaded mail from singleMail controller in app --- .../package/contents/ui/MailListView.qml | 1 + .../package/contents/ui/SingleMailView.qml | 48 +++++++++++++++------- 2 files changed, 35 insertions(+), 14 deletions(-) (limited to 'applications') diff --git a/applications/kmail-quick/package/contents/ui/MailListView.qml b/applications/kmail-quick/package/contents/ui/MailListView.qml index f8b9b046..f6ded917 100644 --- a/applications/kmail-quick/package/contents/ui/MailListView.qml +++ b/applications/kmail-quick/package/contents/ui/MailListView.qml @@ -41,6 +41,7 @@ ScrollView { onClicked: { listView.currentIndex = model.index + singleMail.loadMail(model.id) } } diff --git a/applications/kmail-quick/package/contents/ui/SingleMailView.qml b/applications/kmail-quick/package/contents/ui/SingleMailView.qml index 29c979f1..80c6ddb7 100644 --- a/applications/kmail-quick/package/contents/ui/SingleMailView.qml +++ b/applications/kmail-quick/package/contents/ui/SingleMailView.qml @@ -18,22 +18,42 @@ import QtQuick 2.4 import QtQuick.Controls 1.3 import QtQuick.Layouts 1.1 -import QtWebKit 3.0 -ScrollView { - WebView { - url: "http://kolabnow.com" +Item { + id: root + + Rectangle { + id: background + + anchors.fill: parent + + color: colorPalette.background + } + + Repeater { anchors.fill: parent - onNavigationRequested: { - request.action = WebView.IgnoreRequest; - - // detect URL scheme prefix, most likely an external link - var schemaRE = /^\w+:/; - if (schemaRE.test(request.url)) { - request.action = WebView.AcceptRequest; - } else { - request.action = WebView.IgnoreRequest; - // delegate request.url here + + model: singleMail.model + + delegate: Item { + height: root.height + width: root.widht + + ColumnLayout { + + Label { + text: model.id + } + Label { + text: model.sender + } + Label { + text: model.senderName + } + + Label { + text: model.subject + } } } } -- cgit v1.2.3