Example #1
0
 def event(self, event):
     if event.type() == QEvent.FileOpen and event.file().endswith(
             ".torrent"):
         self.handle_uri(f'file:{event.file()}')
     return QtSingleApplication.event(self, event)
Example #2
0
 def event(self, event):
     if event.type() == QEvent.FileOpen and event.file().endswith(".torrent"):
         uri = path_to_uri(event.file())
         self.handle_uri(uri)
     return QtSingleApplication.event(self, event)