def dragEnterEvent(self, event: QDragEnterEvent) -> None: """Drag file in to our window.""" mime_data: QMimeData = event.mimeData() if not mime_data.hasUrls(): return urls = mime_data.urls() if len(urls) == 1: suffix = QFileInfo(urls[0].toLocalFile()).suffix().lower() if suffix in {'yml', 'pyslvs', 'slvs'} | set(qt_image_suffix): event.acceptProposedAction()
def dragEnterEvent(self, event: QDragEnterEvent): if event.mimeData().hasFormat("application/x_nodepath.list"): event.acceptProposedAction()
def dragEnterEvent(self, event: QDragEnterEvent): # pylint: disable=R0201 if event.mimeData().hasUrls(): event.acceptProposedAction()
def dragEnterEvent(self, event: QDragEnterEvent): if event.mimeData().hasFormat("application/x_nodepath.list"): event.acceptProposedAction()
def dragEnterEvent(self, event: QDragEnterEvent): # pylint: disable=R0201 if event.mimeData().hasFormat("text/plain"): event.acceptProposedAction()