summaryrefslogtreecommitdiffstats
path: root/examples/declarative
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2009-08-28 06:50:06 (GMT)
committerMartin Jones <martin.jones@nokia.com>2009-08-28 06:50:06 (GMT)
commitab643ba4d2193352302d237ae36e1246b5399176 (patch)
tree095cb3db01be9c169a5e602f767f610490ca9696 /examples/declarative
parent67ca33d53ff805ca33ba775524086a89cb975df9 (diff)
parent797162603f35af1f67dd5a7c35c7004eef1828a9 (diff)
downloadQt-ab643ba4d2193352302d237ae36e1246b5399176.zip
Qt-ab643ba4d2193352302d237ae36e1246b5399176.tar.gz
Qt-ab643ba4d2193352302d237ae36e1246b5399176.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Conflicts: src/declarative/QmlChanges.txt
Diffstat (limited to 'examples/declarative')
-rw-r--r--examples/declarative/webview/autosize.qml10
-rw-r--r--examples/declarative/webview/evalandattach.qml1
-rw-r--r--examples/declarative/webview/newwindows.html3
-rw-r--r--examples/declarative/webview/newwindows.qml28
4 files changed, 36 insertions, 6 deletions
diff --git a/examples/declarative/webview/autosize.qml b/examples/declarative/webview/autosize.qml
index 13004a8..dbd94e1 100644
--- a/examples/declarative/webview/autosize.qml
+++ b/examples/declarative/webview/autosize.qml
@@ -1,7 +1,7 @@
import Qt 4.6
// The WebView size is determined by the width, height,
-// idealWidth, and idealHeight properties.
+// preferredWidth, and preferredHeight properties.
Rectangle {
id: Rect
color: "white"
@@ -34,16 +34,16 @@ Rectangle {
}
}
WebView {
- idealWidth: Rect.width/2
- html: "The idealWidth is half."
+ preferredWidth: Rect.width/2
+ html: "The preferredWidth is half."
Rectangle {
color: "#10000000"
anchors.fill: parent
}
}
WebView {
- idealWidth: Rect.width/2
- html: "The_idealWidth_is_half."
+ preferredWidth: Rect.width/2
+ html: "The_preferredWidth_is_half."
Rectangle {
color: "#10000000"
anchors.fill: parent
diff --git a/examples/declarative/webview/evalandattach.qml b/examples/declarative/webview/evalandattach.qml
index bf7f25e..e755819 100644
--- a/examples/declarative/webview/evalandattach.qml
+++ b/examples/declarative/webview/evalandattach.qml
@@ -35,7 +35,6 @@ Item {
anchors.left: parent.left
anchors.right: parent.right
focus: true
- interactive: true
settings.pluginsEnabled: true
javaScriptWindowObjects: [
Object {
diff --git a/examples/declarative/webview/newwindows.html b/examples/declarative/webview/newwindows.html
new file mode 100644
index 0000000..f169599
--- /dev/null
+++ b/examples/declarative/webview/newwindows.html
@@ -0,0 +1,3 @@
+<h1>Multiple windows...</h1>
+
+<a target="_blank" href="newwindows.html">Popup!</a>
diff --git a/examples/declarative/webview/newwindows.qml b/examples/declarative/webview/newwindows.qml
new file mode 100644
index 0000000..9ff902e2
--- /dev/null
+++ b/examples/declarative/webview/newwindows.qml
@@ -0,0 +1,28 @@
+// Demonstrates opening new WebViews from HTML
+//
+// Note that to open windows from JavaScript, you will need to
+// allow it on WebView with settings.javascriptCanOpenWindows: true
+
+import Qt 4.6
+
+Row {
+ id: Pages
+ height: 200
+ resources: [
+ Component {
+ id: WebViewPage
+ Rectangle {
+ width: WV.width
+ height: WV.height
+ WebView {
+ id: WV
+ newWindowComponent: WebViewPage
+ newWindowParent: Pages
+ url: "newwindows.html"
+ }
+ }
+ }
+ ]
+ width: 500
+ ComponentInstance { component: WebViewPage }
+}