I'm trying to understand how network in `Qt` works. I wrote simple client and server and it works fine when as host i use `127.0.0.1` or `localhost`. But how can i connect to server if it's running on the another computer? I tried to write `IP` address like `97.121.34.5` but it doesn't work. What should i do?

Server:

```
Server::Server(int port, QWidget *pwgt): QWidget(pwgt), block(0)
{
    server = new QTcpServer(this);
    if(!server->listen(QHostAddress::Any, port))
    {
        QMessageBox::critical(0, "Server Error", "Unable to start the server: " + server->errorString());
        return;
    }
    connect(server, SIGNAL(newConnection()), this, SLOT(slotNewConnection()));
    edit = new QTextEdit;
    edit->setReadOnly(true);

    QVBoxLayout *lay = new QVBoxLayout;
    lay->addWidget(new QLabel("<H1>Server</H1>"));
    lay->addWidget(edit);
    this->setLayout(lay);
}

```

Client:

```
Client::Client(const QString &host, int port, QWidget *pwgt): QWidget(pwgt), block(0)
{
    socket = new QTcpSocket(this);
    socket->connectToHost(host, port);
    connect(socket, SIGNAL(connected()), this, SLOT(slotConnected()));
    connect(socket, SIGNAL(readyRead()), this, SLOT(slotReadyRead()));
    connect(socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(slotError(QAbstractSocket::SocketError)));

    edit = new QTextEdit;
    input = new QLineEdit;

    edit->setReadOnly(true);

    QPushButton *send = new QPushButton("Send");
    connect(send, SIGNAL(clicked()), this, SLOT(slotSendToServer()));
    connect(input, SIGNAL(returnPressed()), this, SLOT(slotSendToServer()));

    QVBoxLayout *lay = new QVBoxLayout;
    lay->addWidget(new QLabel("<H1>Client</H1>"));
    lay->addWidget(edit);
    lay->addWidget(input);
    lay->addWidget(send);
    this->setLayout(lay);
}

```

Thanks.

P.S. If needed i can post the whole code of my program.