void MyClass::doSth() { QHttp http( "www.google.com" ); connect(&http, SIGNAL(done(bool)), this, SLOT(httpdone(bool))); QFile file( "temp.txt" ); file.open( QIODevice::WriteOnly ); mutex.lock(); http.get( "/" ); fin.wait( &mutex ); file.close(); mutex.unlock(); } (protected slots void MyClass::httpdone(bool error) { if (error == false) { fin.wakeAll(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)