I am trying to download html source code from a website given in a line edit bar. The code for the function which does so appears below. Everything seems to work fine except i get an error "incomplete type 'QUrl' used in nested name specifier. Which I think is kind of weird since I copied this example directly out of the source documentation.

Qt Code:
  1. void MainWindow::gethtml(){
  2. QString address = ui->lineEdit->text();
  3. ui->textEdit->setText(address);
  4. http = new QHttp;
  5. QHttpRequestHeader header("GET", QUrl::toPercentEncoding("/index.html"));
  6. header.setValue("Host", "qt.nokia.com");
  7. http->setHost("qt.nokia.com");
  8. http->request(header);
  9.  
  10. }
To copy to clipboard, switch view to plain text mode 

Thank you in advance!