Пример #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)
Пример #2
0
 def __init__(self, app_name, args):
     QtSingleApplication.__init__(self, app_name, args)
     self.code_executor = None
     self.messageReceived.connect(self.on_app_message)
Пример #3
0
 def __init__(self, app_name, args):
     QtSingleApplication.__init__(self, app_name, args)
     self.code_executor = None
     connect(self.messageReceived, self.on_app_message)
     self.translator = get_default_system_translator()
Пример #4
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)