开发者

Download many files in QT

开发者 https://www.devze.com 2023-02-19 05:28 出处:网络
I want to download some files using QT but I don\'t know what\'s the best way to do it. I was thinking of a DownloadQueueItem that will manage the QNetworkRequest/QNetworkReply for each file and a QLi

I want to download some files using QT but I don't know what's the best way to do it. I was thinking of a DownloadQueueItem that will manage the QNetworkRequest/QNetworkReply for each file and a QList, where I will insert the DownloadQueueItems in order to be able to delete them after they download.

Is my thinking correct? Could you show how you would do it in c开发者_开发技巧ode? Thanks!


The easiest thing to use is the QNetworkAccessManager. It will take a request, download it and emit a signal when it's ready. See for sample code and documentation.

0

精彩评论

暂无评论...
验证码 换一张
取 消