MCPcopy Create free account
hub / github.com/PyQt5/PyQt / __init__

Method __init__

QtRemoteObjects/SyncUi/ClipboardMaster.py:28–36  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

26 )
27
28 def __init__(self, *args, **kwargs):
29 super(WindowMaster, self).__init__(*args, **kwargs)
30 # 监听剪切板
31 clipboard = QApplication.clipboard()
32 clipboard.dataChanged.connect(self.on_data_changed)
33 # 开启节点
34 host = QRemoteObjectHost(QUrl('tcp://0.0.0.0:' + sys.argv[1]), parent=self)
35 host.enableRemoting(self, 'WindowMaster')
36 self.append('开启节点完成')
37
38 def on_data_changed(self):
39 # 服务端剪贴板变化后发送到客户端

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected