PDA

View Full Version : Problem with loadFinished signal from QWebFrame



s87
19th April 2010, 11:24
Hi! I want to create programm, which will do something like this using QWebKit:


for(int counter=0;counter<10;counter++)
{
//
// loading page http://website.com/page/counter/
// for example if counter==3, then load page http://website.com/page/3/
// then get all keywords from current page and insert them to array keywords[]
// then get some data for each keyword
for(int c=0; c<keywords.size(); c++)
{
// load page http://google.com/search/query=keywords[c]
// for example if keyword[1]==car then page will be: http://google.com/search/query=car
// then get some info from page and go to next keyword
}
}
The problem is that loading of pages need some time. And i can't get any info from page before loadFinished signal. But how can fuction which is connected to signal know what to do with current page? It can be http://website.com/page/3/ or http://google.com/search/query=car and depending on page it shoud do different things. So i want to pass some extra data to function, which is connected to signal. So it will know what to do with current page. How can i do this?