Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Created QTcpSocket object in main() and calling write function of socket in another QThread
KYADAV last edited by
Created QTcpSocket object in main() , on receiving data I am connecting to a slot which is part of another QThread (used movetoThread function) . I am able to invoke function But tcpsocket is not calling write function . It seems tcpsocket object is not exist inside Qthread slot.
QTcSocket is asynchronous. In 99% of cases you are better using it without a thread.
Regarding your problem: can you show your code?