Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Program working fine on windows but not running on linux

Program working fine on windows but not running on linux

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 1.1k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Adnan hajar
    wrote on last edited by SGaist
    #1

    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()
    {
        m_pClientsocket->connectToHost(ui->textEditIP->toPlainText(),quint16(ui->textEditPort->toPlainText().toInt()));
        connect (m_pClientsocket,SIGNAL(error(QAbstractSocket::SocketError)),this,SLOT(displayError(QAbstractSocket::SocketError)));
    }
    

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

    1 Reply Last reply
    0
    • R Offline
      R Offline
      Rondog
      wrote on last edited by
      #2

      Any information about the error itself?

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

      A 1 Reply Last reply
      0
      • R Rondog

        Any information about the error itself?

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

        A Offline
        A Offline
        Adnan hajar
        wrote on last edited by
        #3

        @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

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

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

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved