PDA

View Full Version : button click in webview



mind_freak
29th September 2009, 14:35
hii
Does anyone knows how to catch the button click within the Webview such as "Submit" button click? The webview will handle it automatically and I have no idea how to catch the button click within the webpage it renders.:confused:

piotr.dobrogost
29th September 2009, 14:48
I think you might be able to tell QWebView you want be notifed when user clicks something by setting LinkDelegationPolicy (http://doc.trolltech.com/4.6-snapshot/qwebpage.html#linkDelegationPolicy-prop)property to QWebPage::DelegateAllLinks (http://doc.trolltech.com/4.6-snapshot/qwebpage.html#LinkDelegationPolicy-enum). Take a look at void QWebPage::linkClicked ( const QUrl & url ) (http://doc.trolltech.com/4.6-snapshot/qwebpage.html#linkClicked) signal.