修复数值错误问题

This commit is contained in:
2023-02-28 22:03:31 +08:00
parent 6b406a3c2c
commit 5dcc4a9b69
2 changed files with 29 additions and 1 deletions

View File

@@ -254,7 +254,7 @@ class DownloadThread(QtCore.QThread):
#progressbar.update(int(part / show))
filePart.write(chunk)
bytesRead += 1024
self.ChangeDialog.emit(self.dialog, bytesRead / allSize * 100, bytesRead / 1024 / 1024, allSize / 1024 / 1024)
self.ChangeDialog.emit(self.dialog, int(bytesRead / allSize * 100), int(bytesRead / 1024 / 1024), int(allSize / 1024 / 1024))
self.ChangeDialog.emit(self.dialog, 100, 100, 100)
# 写入配置文件
rfile = open(f"{homePath}/.deepin-wine-runner-ubuntu-images/lists.json", "r")