summaryrefslogtreecommitdiffstats
path: root/WebkitSlide.qml
blob: a049f9821190b365cb7916e13a1dc1f69cbb5837 (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
29
30
31
32
33
34
35
36
37
38
39
import QtQuick 2.0
import QtWebKit 3.0
import Qt.labs.presentation 1.0

Slide {
    id: slide

    title: "Qt WebKit - WebView Element"

    WebView {
        id: browser
        anchors.fill: parent
        url: textInput.text

        layer.enabled: true
    }

    Rectangle {
        border.width: 2
        border.color: "black"
        opacity: 0.5
        color: "black"
        anchors.fill: textInput
        anchors.margins: -textInput.height * 0.2;

        radius: -anchors.margins
        antialiasing: true
    }

    TextInput {
        id: textInput
        anchors.top: browser.bottom;
        anchors.horizontalCenter: browser.horizontalCenter
        font.pixelSize: slide.baseFontSize;
        text: "http://www.google.com"
        onAccepted: browser.reload();
        color: "white"
    }
}