summaryrefslogtreecommitdiffstats
path: root/examples/declarative/webview/newwindows.qml
blob: 57cbf4eb50226777ee843ee892e946d874f7c2f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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
    Loader { sourceComponent: WebViewPage }
}