why QTcpSocket.read() will block?
Unsolved
General and Desktop
-
Hi!
Probably because there is no data to read yet.
How and when do you call read()? Is the socket connected?
You should connect the QTcpSocket::readyRead() signal to a slot and read the data in that slot.
See http://doc.qt.io/qt-5/qtnetwork-fortuneclient-example.html