QFile *f = new QFile(filename); f->open(QIODevice::ReadOnly) ... nam.post(req, f); ... // sometime later in the finished slot: finished(QNetworkReply *reply) { // how to close and delete f ? (The QFile object) } Thanks