hereiam
12th August 2013, 19:50
Hi there,
I want to write a programme with several QWebView's. So I created few QWebView's and load for every View another HTML Site. Then I want to delete from every site HTML links. I do this after loadFinished(bool) is emitted from QWebView with evaluateJavaScript() function.
web_view->page()->mainFrame()->evaluateJavaScript("$('a').each( function () { $(this).removeAttr('href'); } )");
I reconginze that the function evaluateJavaScript() only works at its own object but if I load these HTML sites only links from the last loaded HTML are removed.
I that a normal behviour or how can I fix it that links are removed on every HTML site in a QWebView?
I want to write a programme with several QWebView's. So I created few QWebView's and load for every View another HTML Site. Then I want to delete from every site HTML links. I do this after loadFinished(bool) is emitted from QWebView with evaluateJavaScript() function.
web_view->page()->mainFrame()->evaluateJavaScript("$('a').each( function () { $(this).removeAttr('href'); } )");
I reconginze that the function evaluateJavaScript() only works at its own object but if I load these HTML sites only links from the last loaded HTML are removed.
I that a normal behviour or how can I fix it that links are removed on every HTML site in a QWebView?