首页| 论坛| 消息

标题:QTcpSocket发送数据提示
作者:lstcspring
日期:2017-07-05 16:30
内容:

发数据时老是在“应用程序输出”栏提示如下信息。
QSocketNotifier: Socket notifiers cannot be enabled or disabled from another thread
QSocketNotifier: Socket notifiers cannot be enabled or disabled from another thread
QSocketNotifier: Socket notifiers cannot be enabled or disabled from another thread
QSocketNotifier: Socket notifiers cannot be enabled or disabled from another thread
数据也能正常发送,不知道这是怎么回事儿,请指点!谢谢!


#1 [never_forget 07-05 16:55]
断线了吧,,,
#2 [lstcspring 07-05 18:04]
没断线,数据一直在发
#3 [liudianwu 07-06 08:27]
提示已经很清楚啦,你的QTcpSocket跨线程调用啦!犯了大忌!
#4 [lstcspring 07-06 11:19]
我这边就是做一个客户端连接,单独做一个线程来发,接收用的槽函数来,刚才开学这个,请指点一下,这个模式怎么操作,是只能做到一个线程里面吗!

回复 发表
主题 版块