Python での GUI アプリケーション開発は初めてです。PySide を使用して GUI を開発しています。2 つのスレッド間でパラメーターを渡す方法について助けが必要です。カスタム シグナルとスロット メカニズムの使用方法を知っています。
をmylist
から myに送信したい。second thread
main thread
correction_values
Python 疑似コード ( mysecond thread
から にリストを送信したいmain thread
):
---main thread----
self.connect(self.Tests_Start, SIGNAL("Test1_Passed()"), self.StartThread_Test1_Passed, Qt.DirectConnection)
def StartThread_Test1_Passed(self, values):
for value in values:
self.textEdit1.insertPlainText(value)
self.textEdit1.insertPlainText(',')
-
---second thread----
def Tests()
self.emit(SIGNAL("Test1_Passed()"), correction_values) # Is this way possible?