Qt signals and slots for multiple objects

被刻印的时光 ゝ 提交于 2019-12-06 20:52:35

Some suggestions:

  • in your "incomingConnection(int)", i doubt any memory leak for the objects created in heap (tcpsocket, and mythread), use QList (or other container) in your tcpserver to hold the sockets created in your "incomingConnection(int)"
  • prefix the name of SLOT(changeText) with your classes to clarify which objects is your intented sender/receiver
  • I dont think you cant connect two signal like

    connect(thread, SIGNAL(changeText()), this, SIGNAL(changeText()));

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!