When I change QCoreApplication to QApplication the program runs perfectly, but then it can not be run on the server because of missing graphics stack. Can this problem be solved with Qt or is it necessary to install dummy graphics hardware?

I was using curl initially. But then the web page (it is not yahoo) was changed. Now it consists of a couple of JavaScript lines only. JavaScript pulls in content from different sources to compose the web page. I am interested in the html of the composed page, not the html of the JavaScript program. Therefore I need the JavaScript processing that is available in QWebPage but not in QNetworkAccessManager/QNetworkRequest.

No, you DO need a QApplication in order to use QtWebkit, which in turn imply installing (at least) the X11 libs, plus something like Xvfb. wkhtmltopdf employs some trickery to avoid to establish an X11 connection, so you could see how it does that.

Thanks guys, now I have a couple of alternatives. I came across another alternative: HttpFox is a Firefox Plugin that tracks all requests in a Ajax environment. This can help to build a program that pretends to be a Javascript enabled web client.