예제 #1
0
 def dragEnterEvent(self, event: QtGui.QDragEnterEvent):
     # accept url lists (files by drag and drop)
     for url in event.mimeData().urls():
         if str(url.toString()).strip().endswith(".npz"):
             event.accept()
             return
     event.ignore()
예제 #2
0
 def dragEnterEvent(self, event: QtGui.QDragEnterEvent):
     # accept url lists (files by drag and drop)
     for url in event.mimeData().urls():
         url = QUrl2PythonPath(url)
         if url.is_dir() or url.suffix == ".tif":
             event.accept()
             return
     event.ignore()
예제 #3
0
 def dragEnterEvent(self, event: QtGui.QDragEnterEvent):
     # accept url lists (files by drag and drop)
     if event.mimeData().hasFormat("text/uri-list"):
         event.accept()
     else:
         event.ignore()