Please nominate your Qt Champions for 2021! https://forum.qt.io/topic/132134/looking-for-the-2021-qt-champions

[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