def dragEnterEvent(self, event):
        """Reimplement Qt method
        Inform Qt about the types of data that the widget accepts"""
        source = event.mimeData()
        if source.hasUrls():
            if mimedata2url(source):
                event.acceptProposedAction()
            else:
                event.ignore()
        elif source.hasText():
            event.acceptProposedAction()
def dragEnterEvent ( self , event ) : source = event . mimeData ( ) if source . hasUrls ( ) : if mimedata2url ( source ) : event . acceptProposedAction ( ) else : event . ignore ( ) elif source . hasText ( ) : event . acceptProposedAction ( )
Reimplement Qt method
        Inform Qt about the types of data that the widget accepts