summaryrefslogtreecommitdiffstats
path: root/WebkitSlide.qml
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@digia.com>2013-01-30 08:49:26 +0100
committerGunnar Sletta <gunnar.sletta@digia.com>2013-01-30 08:58:17 +0100
commitc43ddf9d354761c51266ecbdc6cb90a3aac1903d (patch)
tree052088c59b7fbf2431a1495e1c227881d51763c2 /WebkitSlide.qml
parent63109c9b545b3d976b5ef55b845c26fa1f05bc00 (diff)
Made webkit optional and revert explicit \n'sHEADmaster
Diffstat (limited to 'WebkitSlide.qml')
-rw-r--r--WebkitSlide.qml80
1 files changed, 6 insertions, 74 deletions
diff --git a/WebkitSlide.qml b/WebkitSlide.qml
index 5a1919f..5ff70b2 100644
--- a/WebkitSlide.qml
+++ b/WebkitSlide.qml
@@ -1,6 +1,4 @@
import QtQuick 2.0
-import QtQuick.Particles 2.0
-import QtWebKit 3.0
import Qt.labs.presentation 1.0
Slide {
@@ -8,80 +6,14 @@ Slide {
title: "Qt WebKit - WebView"
- WebView {
- id: browser
- anchors.fill: parent
- url: editor.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: editor
- anchors.margins: -editor.height * 0.2;
-
- radius: -anchors.margins
- antialiasing: true
- }
-
- TextInput {
- id: editor
- anchors.top: browser.bottom;
- anchors.horizontalCenter: browser.horizontalCenter
- font.pixelSize: slide.baseFontSize;
- text: "http://qt.digia.com"
- onAccepted: browser.reload();
- color: "white"
-
- onCursorPositionChanged: {
- var rect = positionToRectangle(cursorPosition);
- emitter.x = rect.x;
- emitter.y = rect.y;
- emitter.width = rect.width;
- emitter.height = rect.height;
- emitter.burst(10);
- }
-
- ParticleSystem {
- id: sys1
- running: slide.visible
- }
+ Loader {
+ id: webkitLoader
- ImageParticle {
- system: sys1
- source: "images/particle.png"
- color: "white"
- colorVariation: 0.2
- alpha: 0
- }
-
- Emitter {
- id: emitter
- system: sys1
-
- enabled: false
-
- lifeSpan: 2000
-
- velocity: PointDirection { xVariation: 30; yVariation: 30; }
- acceleration: PointDirection {xVariation: 30; yVariation: 30; y: 100 }
-
- endSize: 0
+ anchors.fill: parent
- size: 8
- sizeVariation: 2
- }
+ source: "WebKitSlideContent.qml"
}
-
-
+ centeredText: webkitLoader.status == Loader.Error ? "Qt WebKit not installed or otherwise failed to load" : ""
}
+