From f135b53640f6e74686d3fc8bc6ce8ffc427c36c1 Mon Sep 17 00:00:00 2001 From: Szabolcs David Date: Thu, 10 Apr 2014 05:01:51 -0700 Subject: 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 --- .../webengine/quicknanobrowser/quickwindow.qml | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'examples') 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 = "" } } } -- cgit v1.2.1