[SOLVED] Always empty QWebPage
Hi !
I am trying to parse an html file with qwebelement. But when loading the qwebpage and selecting the mainframe from it, it doesn't contain anything :
Code:
QWebPage *page = new QWebPage();
page
->mainFrame
()->load
(QUrl("http://guilo19.free.fr/HD/column.html"));
QWebFrame *frame = page->mainFrame();
std::cout<<frame->toHtml().toStdString();
QWebElement document = frame->documentElement();
std::cout << document.toOuterXml().toStdString() <<"\n";
std::cout << "voila";
I have already tried to show a qwebiew and the page did load fine.
Thanks
Re: Always empty QWebPage
Re: Always empty QWebPage
QWebPage has loadFinished() signal. I have tried it and it works really great. Thanks. I first tried to use Sleep() so as to test but didn't seem to work.