Update: I am wrong. The QDialog::exec() doesn't block the socket communications...just one of the model dialogs behaviors weirdly.
--------------------------------------------------------------------------------------------
Hi, I saw several posts from the web, saying that it's not necessary to put QTcpsocket in a separate thread. But I met problems when working on a GUI program.
Here's the background: I have a GUI server program and a GUI client program. The server sometimes pops up a model dialog and waits for user's input.
The problem is: as long as the model dialog is visible, the QTcpServer doesn't receives any data from the client socket. Seems QDialog::exec() blocks the procedure. There're many model dialogs in my program, so, should I put QTcpServer and QTcpSocket communication in non-UI threads?
Bookmarks