fix:下载取消后下载进度仍然在widget中显示

This commit is contained in:
柚子 2022-12-13 21:37:40 +08:00
parent 68d91f71ba
commit a27c8b9ace
2 changed files with 8 additions and 1 deletions

@ -90,6 +90,11 @@ void ProgressButton::setProgress(int progress)
{
buttonState = state::openProgress;
ProgressButton::progress = progress;
if(progress == 0)
{
buttonState = state::normal;
update();
}
if(progress == 100)
{
buttonState = state::closeProgress;

@ -44,7 +44,9 @@ DownloadListWidget::DownloadListWidget(QWidget *parent) :
size2 = download_size;
}
if(isdownload){
downloaditemlist[nowDownload - 1]->setSpeed(theSpeed);
downloaditemlist[nowDownload - 1]->setSpeed(theSpeed);
}else{
emit downloadProgress(0);
}
});
}