I reimplemented class QTcpSocket to "Socket". QTcpServer returns only QTcpSocket, so I static casted it to Socket. Program compiles, but slot not visible.

Qt Code:
  1. Socket* soc = static_cast<Socket*> (srv->nextPendingConnection());
To copy to clipboard, switch view to plain text mode 

In class Socket:
Qt Code:
  1. Header:
  2. public slots:
  3. void dataRead();
  4.  
  5. CPP:
  6. connect(this, SIGNAL(readyRead()), this, SLOT(dataRead()));
To copy to clipboard, switch view to plain text mode 

Error message:
Qt Code:
  1. Object::connect: No such slot QTcpSocket::dataRead() in ..\Sample\socket.cpp:16
To copy to clipboard, switch view to plain text mode