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.
void MainWindow::gethtml(){
QString address
= ui
->lineEdit
->text
();
ui->textEdit->setText(address);
header.setValue("Host", "qt.nokia.com");
http->setHost("qt.nokia.com");
http->request(header);
}
void MainWindow::gethtml(){
QString address = ui->lineEdit->text();
ui->textEdit->setText(address);
http = new QHttp;
QHttpRequestHeader header("GET", QUrl::toPercentEncoding("/index.html"));
header.setValue("Host", "qt.nokia.com");
http->setHost("qt.nokia.com");
http->request(header);
}
To copy to clipboard, switch view to plain text mode
Thank you in advance!
Bookmarks