--- a/eric7/WebBrowser/Download/DownloadItem.py Sun May 16 11:43:59 2021 +0200 +++ b/eric7/WebBrowser/Download/DownloadItem.py Sun May 16 20:07:24 2021 +0200 @@ -9,12 +9,12 @@ import os -from PyQt5.QtCore import ( +from PyQt6.QtCore import ( pyqtSlot, pyqtSignal, Qt, QTime, QUrl, QStandardPaths, QFileInfo, QDateTime ) -from PyQt5.QtGui import QPalette, QDesktopServices -from PyQt5.QtWidgets import QWidget, QStyle, QDialog -from PyQt5.QtWebEngineWidgets import QWebEngineDownloadItem +from PyQt6.QtGui import QPalette, QDesktopServices +from PyQt6.QtWidgets import QWidget, QStyle, QDialog +from PyQt6.QtWebEngineWidgets import QWebEngineDownloadItem from E5Gui import E5FileDialog @@ -109,7 +109,7 @@ self.__bytesTotal = -1 # start timer for the download estimation - self.__downloadTime.start() + self.__downloadTime = QTime.currentTime() # attach to the download item object self.__url = self.__downloadItem.url() @@ -421,7 +421,10 @@ if not self.downloading(): return -1.0 - return self.__bytesReceived * 1000.0 / self.__downloadTime.elapsed() + return ( + self.__bytesReceived * 1000.0 / + self.__downloadTime.msecsTo(QTime.currentTime) + ) def __updateInfoLabel(self): """