Created QTcpSocket object in main() and calling write function of socket in another QThread
Unsolved
General and Desktop
-
wrote on 1 Oct 2019, 16:32 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.
-
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?
Regards
1/2