PDA

View Full Version : Send data over TCP



JS27
20th October 2015, 21:30
Hi guys,

i used the tutorial from this page:
http://www.bogotobogo.com/Qt/Qt5_QTcpServer_Multithreaded_Client_Server.php

now i wanted to send data from the gui to the thread by using signals and slots (click on pushButton)

unfortunatly i am getting an error:
Socket notifiers cannot be enabled or disabled from another thread

the socket was defined and started inside of the thread. Can i leave the socket definition inside of the thread ?

Regards

jefftee
21st October 2015, 01:37
Unless you have very specific needs, you do not need a separate thread. The Qt socket classes are asynchronous and will not block your main thread, etc.