'Accept drops of valid file urls'

def dragEnterEvent(self, event):

    urls = event.mimeData().urls()
    if urls:
        try:
            FileFormat.get_reader((OSX_NSURL_toLocalFile(urls[0]) or urls[0].toLocalFile()))
            event.acceptProposedAction()
        except IOError:
            pass
