diff options
Diffstat (limited to 'examples/declarative/webview/newwindows.qml')
-rw-r--r-- | examples/declarative/webview/newwindows.qml | 28 |
1 files changed, 28 insertions, 0 deletions
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 } +} |