更新单线程下载的进度显示
This commit is contained in:
parent
7eb9ffa28c
commit
9278c04b93
3
.gitignore
vendored
3
.gitignore
vendored
@ -71,3 +71,6 @@ Thumbs.db
|
||||
*.dll
|
||||
*.exe
|
||||
|
||||
# 编译目录
|
||||
build/
|
||||
build-*/
|
||||
|
@ -109,6 +109,7 @@ void Widget::singleDownload(const QString& url, const QString& filename)
|
||||
file.write(reply->readAll());
|
||||
});
|
||||
connect(reply, &QNetworkReply::finished, &event, &QEventLoop::quit);
|
||||
connect(reply, &QNetworkReply::downloadProgress, this, &Widget::download_progress_change);
|
||||
connect(reply, &QNetworkReply::errorOccurred, [this, reply](QNetworkReply::NetworkError error){
|
||||
if (error != QNetworkReply::NoError) showError(reply->errorString());
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user