I 'm trying to make up a socket connection performing the following steps:
TcpClient::TcpClient() : m_socket(this) {
bool ok;
ok = QObject::connect(&m_socket, SIGNAL(error(QAbstractSocket::SocketError)),
this, SLOT(displayError(QAbstractSocket::SocketError)));
Q_ASSERT(ok);
ok = QObject::connect(&m_socket, SIGNAL(connected()),
this, SLOT(handleConnection()));
Q_ASSERT(ok);
}
where the m_socket is defined as
QTcpSocket m_socket;
and this is not doing any problem on a Unix based plaform.
If I try to execute the same application in a Windows platform, it crashes and i don't know why.
No compile error was find, but when I launch the app, it freezes when i define the object used to send TCP messages:
ncp::TcpClient clnt;
Does anyone have any ideas why it crashes?
Thank you in advice.
Mirko.
Bookmarks