[webkit-qt] Showing link target upon mouse hover over a link

Jan Kundrát jkt at flaska.net
Tue Nov 27 11:50:31 PST 2012

my application wraps a subclassed QWebView inside a QScrollArea (this is required because I want to treat the whole rendered page and some custom QWidgets as a single scrollable entity). I would like to always show a tooltip with the link destination when user moves her mouse over a link.

Right now, I'm intercepting the QWebPage's linkHovered, that works. However, calling a QWebView::setToolTip(link) from a slot connected to that signal has no visible effect whatsoever, and if I try to use something like QToolTip::showText from the slot, I do get a tooltip at a correct position with a correct text, but it disappears after less than a second.

What am I doing wrong?

With kind regards,

More information about the webkit-qt mailing list