Quote Originally Posted by jiveaxe View Post
Is right connecting recvQuit() to QTcpServer::newConnection() signal?
No, you should get new connection socket, and connect its readyRead signal to recvQuit.



In MainApp I haven't QTcpSocket object (only QTcpServer): I need to create one, right?
When QTcpServer::newConnection is emitted, you should do:
Qt Code:
  1. void MainApp::newConnectionSlot()
  2. {
  3. // Loop on all incoming connections.
  4. while(tcpServer->hasPendingConnections()) {
  5. QTcpSocket *socket = tcpServer->nextPendingConnection();
  6. // Connect socket's signal, etc...
  7. }
  8. }
To copy to clipboard, switch view to plain text mode