• 6124阅读
  • 2回复

怎样取得QWebView里面超连接的地址? [复制链接]

上一主题 下一主题
离线lugaideath
 

只看楼主 倒序阅读 楼主  发表于: 2008-09-19
— 本帖被 XChinux 从 General Qt Programming 移动到本区(2011-01-02) —
QWebView显示的一个页面,我要怎么做,用什么方法,可以实现把鼠标移到超连接上面的时候,再某个地方显示出那连接的URL呢?
离线topilee
只看该作者 1楼 发表于: 2009-08-27
同问,帮顶
离线iiiyyyhhhsss

只看该作者 2楼 发表于: 2009-09-29
用以下信号
webView->page()->linkHovered


manul里这样说明:
void QWebPage::linkHovered ( const QString & link, const QString & title, const QString & textContent )   [signal]

This signal is emitted when the mouse hovers over a link.

link contains the link url. title is the link element's title, if it is specified in the markup. textContent provides text within the link element, e.g., text inside an HTML anchor tag.

When the mouse leaves the link element the signal is emitted with empty parameters.

See also linkClicked().
快速回复
限100 字节
 
上一个 下一个