Ejemplo n.º 1
0
 def dropEvent(self, event):
     """Reimplement Qt method
     Unpack dropped data and handle it"""
     source = event.mimeData()
     fnames = [path for path in mimedata2url(source) if osp.isfile(path)]
     self.add_packages(fnames)
     event.acceptProposedAction()
Ejemplo n.º 2
0
 def dropEvent(self, event):
     """Reimplement Qt method
     Unpack dropped data and handle it"""
     source = event.mimeData()
     fnames = [path for path in mimedata2url(source) if osp.isfile(path)]
     self.add_packages(fnames)
     event.acceptProposedAction()
Ejemplo n.º 3
0
 def dragEnterEvent(self, event):
     """Reimplement Qt method
     Inform Qt about the types of data that the widget accepts"""
     source = event.mimeData()
     if source.hasUrls() and mimedata2url(source):
         event.acceptProposedAction()
Ejemplo n.º 4
0
 def dragEnterEvent(self, event):
     """Reimplement Qt method
     Inform Qt about the types of data that the widget accepts"""
     source = event.mimeData()
     if source.hasUrls() and mimedata2url(source):
         event.acceptProposedAction()