summaryrefslogtreecommitdiffstats
path: root/examples/webengine
diff options
context:
space:
mode:
authorSzabolcs David <davidsz@inf.u-szeged.hu>2014-04-10 05:01:51 -0700
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-05-05 12:50:48 +0200
commitf135b53640f6e74686d3fc8bc6ce8ffc427c36c1 (patch)
tree88bae161f32942406506dbb9307131308c6cdd21 /examples/webengine
parente41b5bf1ef861a69c2825150215d7f5e0c96a847 (diff)
Add linkHovered signal to the QQuickWebEngineView
I dropped hovered title support from the QtWebKit API, it seems we don't need that logic. Change-Id: I5617c295344512a35aa526a6f1307f0b21f866d6 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'examples/webengine')
-rw-r--r--examples/webengine/quicknanobrowser/quickwindow.qml32
1 files changed, 32 insertions, 0 deletions
diff --git a/examples/webengine/quicknanobrowser/quickwindow.qml b/examples/webengine/quicknanobrowser/quickwindow.qml
index ea637e44b..da3eddf93 100644
--- a/examples/webengine/quicknanobrowser/quickwindow.qml
+++ b/examples/webengine/quicknanobrowser/quickwindow.qml
@@ -177,6 +177,38 @@ ApplicationWindow {
WebEngineView {
id: webEngineView
focus: true
+
+ onLinkHovered: {
+ if (hoveredUrl == "")
+ resetStatusText.start()
+ else {
+ resetStatusText.stop()
+ statusText.text = hoveredUrl
+ }
+ }
+ }
+ }
+ }
+
+ Rectangle {
+ id: statusBubble
+ color: "oldlace"
+ property int padding: 8
+
+ anchors.left: parent.left
+ anchors.bottom: parent.bottom
+ width: statusText.paintedWidth + padding
+ height: statusText.paintedHeight + padding
+
+ Text {
+ id: statusText
+ anchors.centerIn: statusBubble
+ elide: ElideMiddle
+
+ Timer {
+ id: resetStatusText
+ interval: 750
+ onTriggered: statusText.text = ""
}
}
}