Hello,

I'm trying to get html code from a webpage. I try to do this with this code:

Qt Code:
  1. QWebView webview;
  2. webview.setUrl (QUrl("http://www.google.com"));
  3. QString s = webview.page()->mainFrame()->toHtml();
To copy to clipboard, switch view to plain text mode 

but the QString s obtains an empty string.., but if i do webview.show(); the page is load correctly...

also if I do webview.setHTML("somthing html"); then i can catch this code correctly calling "toHtml()"...


what I'm doing bad?

thank you!