PDA

View Full Version : QWebPage fails to load, problems with WWW page rendering



T4ng10r
28th June 2012, 12:09
Hi,
I'm facing problems with downloading some WWW page.


int main(int argc, char *argv[])
{ QApplication app(argc, argv);
setProxy();

QWebView view;
QWebPage stWebPage;
view.setPage(&stWebPage);

QWebSettings::globalSettings()->setAttribute(QWebSettings::AutoLoadImages,false);
//stWebPage.mainFrame()->load(QUrl("http://www.google.pl/"));
//stWebPage.mainFrame()->load(QUrl("http://doc.qt.nokia.com/4.7-snapshot/qmainwindow.html#public-slots"));
stWebPage.mainFrame()->load(QUrl("http://www.proline.pl/?p=AMD+X4+II+965+AM3+B"));
view.show();
return app.exec();
}

Works fine with two first links, so its not Network related errors. Its rather site fault.
If I download WWW page code with QNetworkAccessManager.get() - its look ok. But after setting it into QWebFrame - view is incorrect. I mean, only left side of page is somehow visible.
So still, problem is with page code (or some JavaScript test against web crawlers).
Any idea why? I need to download page and parse it to extract some data.

T4ng10r
29th June 2012, 09:22
Interesting. When I run this code on my home computer - all worked properly. So it seem that problem lies in my corporate network (proxy is working fine).