def chuangke( name, s):
app1 = QtWidgets.QApplication(sys.argv)
another=mainwindows.MainWindow(name, s)
another.show()
def aa():
while True:
data = s.recv(1024).decode()
print(data)
another.textBrowser_2.append(name+':'+data)
p2 = mp.Process(target = aa)
p2.start()
p2.join()
sys.exit(app1.exec_())
无论是进程还是线程都没有用,为什么?还有就是用进程线程传递anothor时,会提示错误,好像是不能传对象,而普通的好像可以。。。。。
不创建函数和进程线程直接
while True:
data = s.recv(1024).decode()
print(data)
another.textBrowser_2.append(name+':'+data)
也会出错,就是卡在那,转圈圈,白屏,启动界面时不可以有死循环吗?