Question

I am trying to download the authorization page for VK.COM, but keep getting a white browser window. In that case loadFinished(bool). Code for example:

QWebView* view = new QWebView;
view->load (QUrl ("https://oauth.vk.com/authorize?client_id=1234567&scope=wall,offline&redirect_uri=http://oauth.vk.com/blank.html&display=page&response_type=token"));
view->show ();

If I change the web address (vk.com for example), the site is displayed normally. I don't understand why load() doesn't work normally with query to VK API. I am using Qt 5.0.2. This code works on QT 4

Was it helpful?

Solution

It often happens when server returns anything but 200 status code. In your case there is "401 - Unauthorized" status code.

This link might be helpful for you: http://www.qtcentre.org/threads/37122-Detecting-finished-download-of-HTML-content-for-QWebView

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top