Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [RESOLVED]How to control the step time while recive data
QtWS25 Last Chance

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

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    leafaku
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • C Offline
      C Offline
      ChrisW67
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0
      • L Offline
        L Offline
        leafaku
        wrote on last edited by
        #3

        I got the solution through QTimer.
        Thank you Chris!

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved