blob: e560ed7469fabd436ab34cc5a55367eb5e2f19ac (
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
40
41
42
43
44
|
import QtQuick 2.0
import QtWebKit 3.0
import Qt.labs.presentation 1.0
Slide {
id: slide
title: "Qt WebKit - WebView"
WebView {
id: browser
anchors.fill: parent
url: textInput.text
// This works around rendering bugs in webkit. CSS animations
// and webGL content gets a bad offset, but this hack
// clips it so it is not visible. Not ideal, but it kinda works
// for now.
layer.enabled: true
layer.smooth: 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"
}
}
|