You should cast the QObject pointer to an appropriate type.
Eg.
QTcpSocket* socket
= dynamic_cast<QTcpSocket
*>
(sender
());
if (socket)
{
// do something
}
QTcpSocket* socket = dynamic_cast<QTcpSocket*>(sender());
if (socket)
{
// do something
}
To copy to clipboard, switch view to plain text mode
And how about something like this for the data storage:
QHash<int, HistoryData>
// where int is QTcpSocket::socketDescriptor()
// and HistoryData is any storage you decide to use, eg. QStringList
QHash<int, HistoryData>
// where int is QTcpSocket::socketDescriptor()
// and HistoryData is any storage you decide to use, eg. QStringList
To copy to clipboard, switch view to plain text mode
Bookmarks