From 0817901a597039008a7d240c0ec4092dc261281c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9F=9A=E5=AD=90?= Date: Sun, 11 Dec 2022 00:29:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=8B=E8=BD=BD=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E4=B8=BA=E7=A9=BA=E6=97=B6=E7=9A=84=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/widgets/downloadlistwidget.cpp | 4 ++- src/widgets/downloadlistwidget.ui | 50 ++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 1 deletion(-) diff --git a/src/widgets/downloadlistwidget.cpp b/src/widgets/downloadlistwidget.cpp index 079f6e4..102e1c9 100644 --- a/src/widgets/downloadlistwidget.cpp +++ b/src/widgets/downloadlistwidget.cpp @@ -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 DownloadListWidget::getDIList() void DownloadListWidget::startRequest(QUrl url, QString fileName) { ui->listWidget->show(); + ui->widget->hide(); isBusy = true; isdownload = true; downloaditemlist[allDownload - 1]->free = false; diff --git a/src/widgets/downloadlistwidget.ui b/src/widgets/downloadlistwidget.ui index 39fa984..16cb680 100644 --- a/src/widgets/downloadlistwidget.ui +++ b/src/widgets/downloadlistwidget.ui @@ -14,6 +14,56 @@ Form + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + 11 + + + + The list is currently empty. Go and download some softwares! + + + Qt::AlignCenter + + + false + + + + + + + Qt::Vertical + + + + 20 + 56 + + + + + + +