I saw an example for running a TCP Server with Qt.
In this example a class named Client was created, its constructor had 5 connections between signals and slots of QTcpSocket and Client class. In one of the connections this code was written:
connect(&socket,QOverload<QAbstractSocket::SocketError>::of(&QAbstractSocket::errorOccurred),this,&Client::error);
I am familiar with signal and slot mechanism and how to connect.
Now my questions are:
- What is the role of
ofin above code? - According to
QAbstractSocket'serrorOccurredsignal, why do we useQOverload?
Thanks a lot.