Qhttp get in qt3 to file? file is empty until app is close?
hi,
i want to access the file where i put the http->get, how ever the file remain empty until the application closes? how to solve this?
connect(http, SIGNAL(done(bool)), this, SLOT(read_now()));
.....
QFile *file = new QFile(fileName);
http->setHost(url.host(),url.port() != -1 ? url.port() : 80);
http->get(url.path() +"?" + url.query(),&file);
....
void myclass::readnow()
{
//still empty? how to solve this?
}
thanks
Re: Qhttp get in qt3 to file? file is empty until app is close?
I cannot edit my post.. just want to add SOLVED
i just forgot to call file->close();
adding file->close() to requestfinished() do the trick..
but still, took me for about 2 hours to solve this..