[Interest] Deleting the QNetworkAccessManager post(req, iodev) QIODevice?

Jason H jhihn at gmx.com
Wed Mar 2 17:45:15 CET 2016


Let me expand on this, I can f->setParent(reply), but I also need to delete the file from disk. If I rely on the parent/child object deletion, I can't get a change to delete the file.

> 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)
> 
> }
>



More information about the Interest mailing list