diff options
author | Michael Bohlender <michael.bohlender@kdemail.net> | 2015-11-22 14:41:02 +0100 |
---|---|---|
committer | Michael Bohlender <michael.bohlender@kdemail.net> | 2015-11-22 14:41:02 +0100 |
commit | 45d8493c9b6b57dc163188b0cb2744efd4b9253a (patch) | |
tree | c141eb9510520925e7f75cb2eedd1d487da25ea9 | |
parent | 09781adf509daccaf612cc813ac44a8b235c65a3 (diff) | |
download | kube-45d8493c9b6b57dc163188b0cb2744efd4b9253a.tar.gz kube-45d8493c9b6b57dc163188b0cb2744efd4b9253a.zip |
add webview to singlemailview
-rw-r--r-- | applications/kmail-quick/package/contents/ui/SingleMailView.qml | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/applications/kmail-quick/package/contents/ui/SingleMailView.qml b/applications/kmail-quick/package/contents/ui/SingleMailView.qml index b9a517ec..29c979f1 100644 --- a/applications/kmail-quick/package/contents/ui/SingleMailView.qml +++ b/applications/kmail-quick/package/contents/ui/SingleMailView.qml | |||
@@ -18,7 +18,23 @@ | |||
18 | import QtQuick 2.4 | 18 | import QtQuick 2.4 |
19 | import QtQuick.Controls 1.3 | 19 | import QtQuick.Controls 1.3 |
20 | import QtQuick.Layouts 1.1 | 20 | import QtQuick.Layouts 1.1 |
21 | import QtWebKit 3.0 | ||
21 | 22 | ||
22 | Rectangle { | 23 | ScrollView { |
23 | color: "green" | 24 | WebView { |
25 | url: "http://kolabnow.com" | ||
26 | anchors.fill: parent | ||
27 | onNavigationRequested: { | ||
28 | request.action = WebView.IgnoreRequest; | ||
29 | |||
30 | // detect URL scheme prefix, most likely an external link | ||
31 | var schemaRE = /^\w+:/; | ||
32 | if (schemaRE.test(request.url)) { | ||
33 | request.action = WebView.AcceptRequest; | ||
34 | } else { | ||
35 | request.action = WebView.IgnoreRequest; | ||
36 | // delegate request.url here | ||
37 | } | ||
38 | } | ||
39 | } | ||
24 | } \ No newline at end of file | 40 | } \ No newline at end of file |