问题遇到的现象和发生背景
调用self.w.ui.textEdit.setHtml报错进程已结束,退出代码-1073741819 (0xC0000005)
调用self.w.ui.textEdit.insertPlainText('Str')这句就没事,可以正常插入
用button的点击触发事件也可以修改,放在定时器里边就不行
问题相关代码,请勿粘贴截图
def startdaticlick(self):
t1 = threading.Timer(1, self.thread_Timer)
# # 启动线程
t1.start()
def thread_Timer(self):
global daojishi
if (daojishi == 0):
daojishi = 2
try:
# self.w.ui.textEdit.insertPlainText('Str')
self.w.ui.textEdit.setHtml("<font color='red' size='5'><red>hello</font>");
except Exception as e:
print('未知错误%s'%(e))
t1 = threading.Timer(1, self.thread_Timer)
# # 启动线程
t1.start()
运行结果及报错内容
进程已结束,退出代码-1073741819 (0xC0000005)
我的解答思路和尝试过的方法
1,没用csv文件
2,把设置里边pyqt兼容也去掉对勾了
3,没有安装后h5py