Incompatible sender/receiver arguments using QTcpSocket::bytesWritten(qint64)

  • I got this error

    QObject::connect: Incompatible sender/receiver arguments
            QTcpSocket::bytesWritten(qint64) --> MainWindow::bytes(quint64)

    when using as slot to my bytes written socket
    code when i use this

        socket = new QTcpSocket(this);
        byteswriten = 0;

    the header

    void bytes(quint64 n); // i try this too void bytes(quint64 n = 0); !!

    what should i do to solve this and get a progressbar for bytes written to socket
    Thanks in advance

  • Qt Champions 2017

    Just use qint64 throughout. i.e.

    void MainWindow::bytes(qint64)

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.