summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/declarative/webview/evalandattach.html31
-rw-r--r--examples/declarative/webview/evalandattach.qml55
-rw-r--r--examples/declarative/webview/qdeclarative-in-html.qml33
3 files changed, 0 insertions, 119 deletions
diff --git a/examples/declarative/webview/evalandattach.html b/examples/declarative/webview/evalandattach.html
deleted file mode 100644
index 48a1c33..0000000
--- a/examples/declarative/webview/evalandattach.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<body bgcolor=gray onload="ftext.confirmed.connect (ftext_confirmed); ">
- <script>
- do_it = function () {var oPressed = document.getElementById('pressed');
- oPressed.innerHTML = 'MouseArea in QML clicked!';};
- ftext_confirmed = function () { statusText1.text = ftext.text; var oT = document.getElementById('htmlTextInput'); oT.value = ftext.text }
- </script>
- <table border=1>
- <tr>
- <td>&nbsp</td>
- <td id='pressed'></td>
- </tr>
- <tr>
- <td><label for='htmlTextInput'>Type something:</label></td>
- <td><input type='text' name='htmlTextInput' size='25' id='htmlTextInput'
- onfocus="statusText2.text = 'Focus in html text input.'"></td>
- </tr>
- <tr>
- <td><label for='htmlButton'>&nbsp;</label></td>
- <td>
- <input type='button' id='htmlButton' value='Push'
- onclick="var oText = document.getElementById('htmlTextInput'); statusText1.text = oText.value; ftext.text = oText.value" />
- </tr>
- </table>
- <p>
- Below a qml(QFxItem) object inside webkit:
- </p>
- <object data=content/FieldText.qml TYPE=application/x-qt-plugin id="ftext_id" text="" label="Cool:" width="200"
- objectname="ftext">
- </object>
-</body>
-
diff --git a/examples/declarative/webview/evalandattach.qml b/examples/declarative/webview/evalandattach.qml
deleted file mode 100644
index d219d84..0000000
--- a/examples/declarative/webview/evalandattach.qml
+++ /dev/null
@@ -1,55 +0,0 @@
-import Qt 4.6
-import org.webkit 1.0
-
-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
- }
-
- MouseArea {
- 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
- settings.pluginsEnabled: true
- javaScriptWindowObjects: [
- QtObject {
- id: txt
- WebView.windowObjectName: "statusText1"
- property string text: "Click me!"
- },
- QtObject {
- id: txt2
- WebView.windowObjectName: "statusText2"
- property string text: ""
- }
- ]
- url: "evalandattach.html"
- }
-
-}
diff --git a/examples/declarative/webview/qdeclarative-in-html.qml b/examples/declarative/webview/qdeclarative-in-html.qml
deleted file mode 100644
index 172ea4b..0000000
--- a/examples/declarative/webview/qdeclarative-in-html.qml
+++ /dev/null
@@ -1,33 +0,0 @@
-import Qt 4.6
-import org.webkit 1.0
-
-// The WebView supports QML data through the HTML OBJECT tag
-Rectangle {
- color:"blue"
- Flickable {
- width: parent.width
- height: parent.height/2
- contentWidth: web.width*web.scale
- contentHeight: web.height*web.scale
- WebView {
- id: web
- width: 250
- height: 420
- zoomFactor: 0.75
- smoothCache: true
- settings.pluginsEnabled: true
- html: "<html>\
- <body bgcolor=white>\
- These are QML plugins, shown in a QML WebView via HTML OBJECT tags, all scaled to 75%\
- and placed in a Flickable area...\
- <table border=1>\
- <tr><th>Duration <th>Color <th>Plugin\
- <tr><td>500 <td>red <td><OBJECT data=content/SpinSquare.qml TYPE=application/x-qt-plugin width=100 height=100 period=500 color=red />\
- <tr><td>2000 <td>blue <td><OBJECT data=content/SpinSquare.qml TYPE=application/x-qt-plugin width=100 height=100 period=2000 color=blue />\
- <tr><td>1000 <td>green <td><OBJECT data=content/SpinSquare.qml TYPE=application/x-qt-plugin width=100 height=100 period=1000 color=green />\
- </table>\
- </body>\
- </html>"
- }
- }
-}