--- a/eric7/MicroPython/MicroPythonSerialPort.py Sun May 16 11:43:59 2021 +0200 +++ b/eric7/MicroPython/MicroPythonSerialPort.py Sun May 16 20:07:24 2021 +0200 @@ -8,8 +8,8 @@ MicroPython devices. """ -from PyQt5.QtCore import QIODevice, QTime, QCoreApplication, QEventLoop -from PyQt5.QtSerialPort import QSerialPort +from PyQt6.QtCore import QIODevice, QTime, QCoreApplication, QEventLoop +from PyQt6.QtSerialPort import QSerialPort class MicroPythonSerialPort(QSerialPort): @@ -106,8 +106,7 @@ data = bytearray() self.__timedOut = False - t = QTime() - t.start() + t = QTime.currentTime() while True: QCoreApplication.processEvents( QEventLoop.ProcessEventsFlag.ExcludeUserInputEvents) @@ -118,7 +117,7 @@ break if size is not None and len(data) >= size: break - if t.elapsed() > self.__timeout: + if t.msecsTo(QTime.currentTime()) > self.__timeout: self.__timedOut = True break