示例#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()
示例#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()
示例#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()
示例#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()