def eventFilter(self, source, event: QEvent):
        """This is the Drag and Drop event filter for the init image QLineEdit"""
        if event.type() == QEvent.DragEnter:
            if event.mimeData().hasFormat("text/plain"):
                event.acceptProposedAction()
            return True
        elif event.type() == QEvent.Drop:
            event.acceptProposedAction()
            path = unquote(urlparse(event.mimeData().text()).path)
            self.img_path.setText(path)
            return True

        return False
This is the Drag and Drop event filter for the init image QLineEdit
src/frontend/gui/img2img_widget.py