From ffdb37081cac1fcaa6f62f38f18b8d271e95eb9c Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Tue, 25 Aug 2009 10:23:27 +1000 Subject: Missed files. --- examples/declarative/webview/evalandattach.html | 31 ++++++++++++++ examples/declarative/webview/evalandattach.qml | 55 +++++++++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 examples/declarative/webview/evalandattach.html create mode 100644 examples/declarative/webview/evalandattach.qml diff --git a/examples/declarative/webview/evalandattach.html b/examples/declarative/webview/evalandattach.html new file mode 100644 index 0000000..c0992bb --- /dev/null +++ b/examples/declarative/webview/evalandattach.html @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + +
 
+ +
+

+ Below a qml(QFxItem) object inside webkit: +

+ + + + diff --git a/examples/declarative/webview/evalandattach.qml b/examples/declarative/webview/evalandattach.qml new file mode 100644 index 0000000..bf7f25e --- /dev/null +++ b/examples/declarative/webview/evalandattach.qml @@ -0,0 +1,55 @@ +import Qt 4.6 + +Item { + height: 640 + width: 360 + Text { + id: teksti + text: webView.statusText1 + anchors.top: parent.top + height: 30 + anchors.left: parent.left + width: parent.width/2 + } + + Text { + id: teksti2 + text: webView.statusText2 + anchors.top: parent.top + height: 30 + anchors.left: teksti.right + anchors.right: parent.right + } + + MouseRegion { + anchors.fill: teksti + onClicked: { webView.evaluateJavaScript ("do_it()") } + } + + WebView { + id: webView + property alias statusText1: txt.text + property alias statusText2: txt2.text + anchors.top: teksti.bottom + anchors.bottom: parent.bottom + anchors.left: parent.left + anchors.right: parent.right + focus: true + interactive: true + settings.pluginsEnabled: true + javaScriptWindowObjects: [ + Object { + id: txt + WebView.windowObjectName: "statusText1" + property string text: "Click me!" + }, + Object { + id: txt2 + WebView.windowObjectName: "statusText2" + property string text: "" + } + ] + url: "evalandattach.html" + } + +} -- cgit v0.12