From 8e924832cdee1a73cba91ef3adeccc16fcc606c7 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Tue, 11 Dec 2012 15:28:20 +0100 Subject: Made a dedicated webkit slide --- SlideDeck.qml | 16 +++++++++++++--- WebkitSlide.qml | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 3 deletions(-) create mode 100644 WebkitSlide.qml diff --git a/SlideDeck.qml b/SlideDeck.qml index ef0f89e..5775eda 100644 --- a/SlideDeck.qml +++ b/SlideDeck.qml @@ -105,7 +105,9 @@ We hope you will enjoy Qt 5.0 as much as we have enjoyed creating it." title: "Qt 5.0 - Features" writeInText: "OpenGL based scene graph for Qt Quick 2.0 - providing velvet animations, particles and impressive graphical effects -Multimedia - Audio, Video and Camera support on all major platforms" +Multimedia - Audio, Video and Camera support on all major platforms + +WebKit - Full HTML 5 support from the worlds most popular web engine, including WebKit2 process separation" } @@ -155,6 +157,16 @@ It also integrates nicely with the Qt Graphical Effects module." + /******************************************************************************** + * + * Multimedia + * + */ + + WebkitSlide { } + + + /******************************************************************************** * * The rest @@ -171,8 +183,6 @@ It also integrates nicely with the Qt Graphical Effects module." Qt Platform Abstraction - Unifying the Qt codebase across platforms and greatly reducing the effort needed to port to new platforms -WebKit - Full HTML 5 support from the worlds most popular web engine, including WebKit2 process separation - Wayland support - Wayland 1.0 compatible Qt backend and compositor framework" } diff --git a/WebkitSlide.qml b/WebkitSlide.qml new file mode 100644 index 0000000..a049f98 --- /dev/null +++ b/WebkitSlide.qml @@ -0,0 +1,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" + } +} -- cgit v1.2.3