PDA

View Full Version : QWebView catching the linkClicked for use as a filter.



iblis
28th February 2014, 06:48
Hi,

I have set the delegation policy of a QWebpage in a QWebview to DelegateAllLinks, however say I am only interested in delegating a small subset of links that do not fall into the External Link Category.

What is the best way to tackle this kind of problem in QT.



Psuedo:
//linkClicked Signal caught by slot
mySlot(url){
if( url == notinterested ){
// handle like QT is not catching these --> pass to page
} else if( url == TheBerryIWant ){
// handle by some other component
}
}


Now I want to catch these links as early as possible, before the http Get is issued for its retrieval.


Ideas?

Maximus2
1st December 2014, 23:11
Hey there,

Not sure if you found the solution or not, but I had it working this way :
http://qt-project.org/forums/viewthread/50299/

Good luck!