(event)
Accept drops of valid file urls
Accept drops of valid file urls
Accept drops of valid file urls
def dragEnterEvent(event):
        """Accept drops of valid file urls"""
        urls = event.mimeData().urls()
        if urls:
            try:
                FileFormat.get_reader(urls[0].toLocalFile())
                event.acceptProposedAction()
            except IOError:
                pass
def dragEnterEvent ( event ) : urls = event . mimeData ( ) . urls ( ) if urls : try : FileFormat . get_reader ( urls [ 0 ] . toLocalFile ( ) ) event . acceptProposedAction ( ) except IOError : pass