コード例 #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
ファイル: tribler_app.py プロジェクト: xoriole/tribler
 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)