QString fileName
=fileInfo.
fileName();
if (QFile::exists(fileName
)) { tr("There already exists a file called %1 in "
"the current directory.")
.arg(fileName));
}
file = new QFile(fileName
);
tr("Unable to save the file %1: %2.")
.arg(fileName).arg(file->errorString()));
delete file;
file = 0;
}
file.setFileName(fileName);
setHost
(url.
host(),
QHttp::ConnectionModeHttp);
QUrl url = QUrl::fromUserInput(strUrl);
QFileInfo fileInfo(url.path());
QString fileName=fileInfo.fileName();
if (QFile::exists(fileName)) {
QMessageBox::information(this, tr("HTTP"),
tr("There already exists a file called %1 in "
"the current directory.")
.arg(fileName));
}
file = new QFile(fileName);
if (!file->open(QIODevice::WriteOnly)) {
QMessageBox::information(this, tr("HTTP"),
tr("Unable to save the file %1: %2.")
.arg(fileName).arg(file->errorString()));
delete file;
file = 0;
}
file.setFileName(fileName);
file.open(QIODevice::WriteOnly);
QHttp *http;
http=new QHttp(this);
setHost(url.host(),QHttp::ConnectionModeHttp);
To copy to clipboard, switch view to plain text mode
Am getting while using the HTTP . It says undefined reference to the http object.
I just want to download a file from the host.
Bookmarks