radeberger
29th April 2010, 09:18
Hi everyboby!
I have QTcpSocket, QTcpServer arrays, declared as follow:
QTcpServer *tcpClient;
QTcpSocket *tcpServer;
in the constructor:
tcpServer = new QTcpServer[numConnec];
tcpClient = new QTcpSocket[numConnec];
I connected the signal "newConnection" of the first QTcpServer with my slot acceptconnection as follow:
connect(&tcpServer[0], SIGNAL(newConnection()),SLOT(acceptConnection()), Qt::DirectConnection);
and in the acceptconnection I have:
&tcpClient[0] = &tcpServer[0].nextPendingConnection();
connect(&tcpClient[0], SIGNAL(readyRead()),SLOT(startRead0()), Qt::DirectConnection);
I get the following error: '&' requires l-value in the &tcpClient[0] = &tcpServer[0].nextPendingConnection();
do you know how I'm doing bad?
Thanks in advance!
I have QTcpSocket, QTcpServer arrays, declared as follow:
QTcpServer *tcpClient;
QTcpSocket *tcpServer;
in the constructor:
tcpServer = new QTcpServer[numConnec];
tcpClient = new QTcpSocket[numConnec];
I connected the signal "newConnection" of the first QTcpServer with my slot acceptconnection as follow:
connect(&tcpServer[0], SIGNAL(newConnection()),SLOT(acceptConnection()), Qt::DirectConnection);
and in the acceptconnection I have:
&tcpClient[0] = &tcpServer[0].nextPendingConnection();
connect(&tcpClient[0], SIGNAL(readyRead()),SLOT(startRead0()), Qt::DirectConnection);
I get the following error: '&' requires l-value in the &tcpClient[0] = &tcpServer[0].nextPendingConnection();
do you know how I'm doing bad?
Thanks in advance!