记录 Cannot send events to objects owned by a different thread. 两个问题解决方法

---------------------------
Microsoft Visual C++ Runtime Library
ASSERT failure in QCoreApplication::sendEvent: "Cannot send events to objects owned by a different thread. Current thread 0x0x13c8988. Receiver '' (of type 'Worker') was created in thread 0x0x1135d14", file kernel\qcoreapplication.cpp, line 589


QWaitCondition: Destroyed while threads are still waiting
ASSERT failure in QCoreApplication::sendEvent: "Cannot send events to objects owned by a different thread. Current thread 14107a98. Receiver '' (of type 'QNetworkAccessManager') was created in thread 32a48", file kernel\qcoreapplication.cpp, line 505

 

第一个是 我在子线程中  发送 信号A到 mainwindow中  emit signal_Main_Transmit

Main 中使用 一个timer 来设置弹窗停留时间 到时就调用close timerevent 关闭窗口. 

当弹窗显示时间片到时,切换到子线程中, 子线程中会继续发送信号A到 mainwindow中 , timer-> start()

而之前弹窗 timerevent 还没有终止, close timere

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值