Qt World Summit: Register Today!

[RESOLVED]How to control the step time while recive data

  • Hi All,
    I have this code:
    // Note: QNetworkReply reply;
    // Note: QNetworkAccessManager qnam;
    @ reply = qnam.get(QNetworkRequest(url));
    connect(reply, SIGNAL(downloadProgress(qint64,qint64)),
    this, SLOT(updateDataReadProgress(qint64,qint64))); // I have to recive the data per 1s.@
    Any help!
    Thans very much.

  • You cannot control when data is received: that depends on the sender and the network.

    If you want to update a progress meter every second then simply store the number of bytes received as they are received. Use a QTimer separate to trigger updating the meter every second using the last stored byte count.

  • I got the solution through QTimer.
    Thank you Chris!

Log in to reply