Creating derived class based on QTcpServer
Solved
General and Desktop
-
I'm using this site as a guide:
https://www.bogotobogo.com/cplusplus/sockets_server_client_QT.phpI've created a class:
class clsSocketServer : public QTcpServer { Q_OBJECT private: protected: void incomingConnection(int intSckD); public: static const quint16 mscuint16port = 8123; explicit clsSocketServer(QObject* pParent = nullptr); ~clsSocketServer(); };
I'm seeing 'clsSocketServer::incomingConnection' hide overloaded virtual function' to the right of the prototype for incomingConnection, also when I compile there are a lot more displayed with [-Woverloaded-virtual] appended.
How do I get rid of these?
-
Hi,
You are looking at a Qt 4 implementation.
Take a look at the Qt 5 QTcpServer::incomingConnection signature.