Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

[SOLVED] QTcpServer QObject::connect() error



  • Slot in my TcpServer (rel. of QTcpServer)
    @
    void TcpServer::saveConnection()
    {
    QTcpSocket *a = nextPendingConnection();
    connect(a, SIGNAL(readyRead()), this, SLOT(readSocket())); // error here.
    }
    @

    Compile output:
    <code>no matching function for call to 'TcpServer::connect(QTcpSocket*&, const char [13], TcpServer* const, const char [14])'</code>

    UPD: bug was very stupid. I don't included QTcpSocket;)


Log in to reply