(self, *args, **kwargs)
| 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 | # 服务端剪贴板变化后发送到客户端 |
nothing calls this directly
no outgoing calls
no test coverage detected