... can help me

my code:

Qt Code:
  1. class HSM : public QDialog
  2. {
  3. Q_OBJECT
  4. public:
  5. CProjectManager *m_pPrj;
  6. HSM(QWidget *parent = 0, Qt::WFlags flags = 0);
  7. ~HSM();
  8. private:
  9. Ui::HSMClass ui;
  10. Server server;
  11. private slots:
  12. void on_pushButton_clicked();
  13. void SetLine(QString cMsg);
  14. };
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. HSM::HSM(QWidget *parent, Qt::WFlags flags)
  2. : QDialog(parent, flags)
  3. {
  4.  
  5. ui.setupUi(this);
  6.  
  7. QObject::connect(this, SIGNAL(SendMSG(QString)),
  8. this, SLOT(SetLine(QString cMsg)));// ???????
  9. }
  10.  
  11. HSM::~HSM()
  12. {
  13. //m_pPrj->FreeInst();
  14. }
  15.  
  16. void HSM::on_pushButton_clicked()
  17. {
  18. //some code
  19. }
  20.  
  21. void HSM::SetLine(QString cMsg)
  22. {
  23. ui.listWidget->addItem(cMsg);
  24. }
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. class FortuneThread : public QThread
  2. {
  3. Q_OBJECT
  4. public:
  5. FortuneThread(int socketDescriptor,QObject *parent);
  6. ~FortuneThread();
  7. void run();
  8. signals:
  9. void error(QTcpSocket::SocketError socketError);
  10. private:
  11. int socketDescriptor;
  12. };
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. FortuneThread::FortuneThread(int socketDescriptor,QObject *parent)
  2. : QThread(parent), socketDescriptor(socketDescriptor)
  3. {
  4.  
  5. }
  6.  
  7. FortuneThread::~FortuneThread()
  8. {
  9.  
  10. }
  11. void FortuneThread::run()
  12. {
  13. Connection connection;
  14. if(!connection.setSocketDescriptor(socketDescriptor))
  15. {
  16. emit error(connection.error());
  17. return;
  18. }
  19. connect(&connection, SIGNAL(disconnected()), this, SLOT(quit()));
  20. exec();
  21. }
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. class Connection : public QTcpSocket
  2. {
  3. Q_OBJECT
  4. public:
  5. Connection(QObject *parent = 0);
  6. private slots:
  7. void processReadyRead();
  8. signals:
  9. void SendMSG(QString cMsg);
  10.  
  11. };
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. Connection::Connection(QObject *parent)
  2. : QTcpSocket(parent)
  3. {
  4. QObject::connect(this, SIGNAL(readyRead()), this, SLOT(processReadyRead()));
  5. }
  6.  
  7. void Connection::processReadyRead()
  8. {
  9.  
  10. //some code
  11. //
  12. //
  13. emit SendMSG("new_line");
  14. }
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. class Server : public QTcpServer
  2. {
  3. Q_OBJECT
  4. public:
  5. Server(QObject *parent = 0);
  6. signals:
  7. void newConnection(Connection *connection);
  8. protected:
  9. void incomingConnection(int socketDescriptor);
  10. };
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. Server::Server(QObject *parent):QTcpServer(parent)
  2. {
  3. if (!listen(QHostAddress::Any,1718)) {
  4. return;
  5. }
  6. }
  7.  
  8. void Server::incomingConnection(int socketDescriptor)
  9. {
  10.  
  11. FortuneThread *thread = new FortuneThread(socketDescriptor,this);
  12. connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater()));
  13. thread->start();
  14.  
  15. }
To copy to clipboard, switch view to plain text mode 

But at connection of the client record all the same does not appear Where I was mistaken?