--- a/src/eric7/MicroPython/BluetoothDialogs/BluetoothController.py Tue May 06 11:09:21 2025 +0200 +++ b/src/eric7/MicroPython/BluetoothDialogs/BluetoothController.py Tue May 06 15:32:29 2025 +0200 @@ -30,6 +30,7 @@ super().__init__(parent) self.__mpy = microPython + self.__mpy.disconnected.connect(self.__disconnectedFromDevice) self.__btStatusDialog = None @@ -64,6 +65,15 @@ return btMenu @pyqtSlot() + def __disconnectedFromDevice(self): + """ + Private slot handling disconnection from a device. + """ + if self.__btStatusDialog is not None: + self.__btStatusDialog.deleteLater() + self.__btStatusDialog = None + + @pyqtSlot() def __showBtStatus(self): """ Private slot to show the status and some parameters of the Bluetooth interface.