Important: Please read the Qt Code of Conduct -

Program working fine on windows but not running on linux

  • I've been trying to creat a server - client program where the client send a message to the server.

    The problem i m having is that when i try to connect to the server on linux it wont connect.
    On the other hand if I try to do it on windows it works.

    I m not sure if it s a problem with the setting of the computer or it s a part of the code;
    please reply with your suggestion of what might be the problem.

    attach to this message a useful chunk of code:

    void Dialog::on_pushButtonConnect_clicked()
        connect (m_pClientsocket,SIGNAL(error(QAbstractSocket::SocketError)),this,SLOT(displayError(QAbstractSocket::SocketError)));

    [edit: Corrected coding tags ``` not @ SGaist]

  • Any information about the error itself?

    Is the IP local ( or on another computer. If it is not local maybe you have a firewall problem?

  • @Rondog in both cases it is not working my client part works if i run the server part on another laptop but the server part is not capable of accepting incoming connection from other laptops

  • Lifetime Qt Champion


    Like @Rondog suggested, do you have a firewall blocking incoming connections ? Are you using a reserved port number ?

Log in to reply