def METHOD_NAME(self, event):
    mimeData = event.mimeData()
    if not mimeData.hasUrls():
        qt.QMessageBox.critical(self, "Drop cancelled", "A file is expected")
        return
    urls = mimeData.urls()
    if len(urls) > 1:
        qt.QMessageBox.critical(self, "Drop cancelled", "A single file is expected")
        return
    try:
        path = urls[0].toLocalFile()
        detector = pyFAI.detectors.detector_factory(path)
    except IOError as e:
        _logger.error("Error while loading dropped URL %s", e, exc_info=True)
        qt.QMessageBox.critical(self, "Drop cancelled", str(e))
        return
    except Exception as e:
        _logger.error("Error while reading dropped URL %s", e, exc_info=True)
        qt.QMessageBox.critical(self, "Drop cancelled", str(e))
        return
    if self.__model is None:
        _logger.error("No model defined")
        return
    self.__model.setDetector(detector)