添加下载列表为空时的提示

This commit is contained in:
2022-12-11 00:29:51 +08:00
parent e171904a34
commit 0817901a59
2 changed files with 53 additions and 1 deletions

View File

@@ -12,7 +12,8 @@ DownloadListWidget::DownloadListWidget(QWidget *parent) :
this->setAttribute(Qt::WA_Hover,true);
setFocus();
setFixedSize(500,400);
ui->listWidget->hide();
ui->widget->show();
// 计算显示下载速度
download_speed.setInterval(1000);
download_speed.start();
@@ -104,6 +105,7 @@ QList<DownloadItem *> DownloadListWidget::getDIList()
void DownloadListWidget::startRequest(QUrl url, QString fileName)
{
ui->listWidget->show();
ui->widget->hide();
isBusy = true;
isdownload = true;
downloaditemlist[allDownload - 1]->free = false;