You are not assigning a QTcpSocket* to a QTcpSocket*.
Create a list or vector of QTcpSocket* like Wysota said.
Example QList<QTcpSocket *> mySocketList;
Add new sockets to that list and use the QList functions to access them.
You are not assigning a QTcpSocket* to a QTcpSocket*.
Create a list or vector of QTcpSocket* like Wysota said.
Example QList<QTcpSocket *> mySocketList;
Add new sockets to that list and use the QList functions to access them.
ok, thank you very much, I will try it with a list...
Hi!
I tried this with the sender() function but I had some trouble.
in the slot function I have:
myclass *tcpServerSender = qobject_cast<myclass*>(QObject::sender());
but this pointer is always NULL, do you have any ideas, how can I get the pointer to the object?
thanks!
You shouldn't really be using sender() and that ugly type casting. Use QSignalMapper instead.
Bookmarks