Results 1 to 2 of 2

Thread: QNetworkReply::uploadProgress signal returns bytesSent=0 and bytesTotal=0

  1. #1
    Join Date
    Jan 2013
    Posts
    11
    Qt products
    Qt4 Qt5
    Platforms
    Windows Android

    Default QNetworkReply::uploadProgress signal returns bytesSent=0 and bytesTotal=0

    Hi all,

    After successful upload QNetworkReply::uploadProgress signal returns bytesSent=0 and bytesTotal=0 (during upload the progress is OK).
    Is that normal?

    Windows 7 x64 Pro
    Qt 5.0.1
    Visual Studio 2010 SP1
    Qt5 Visual Studio Add-in

  2. #2
    Join Date
    Dec 2011
    Posts
    36
    Thanks
    14
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QNetworkReply::uploadProgress signal returns bytesSent=0 and bytesTotal=0

    Hi,

    It states in the class ref. for QNetWorkReply: The upload is finished when bytesSent is equal to bytesTotal. At that time, bytesTotal will not be -1.
    I assume that at the end of a successfull upload the counter is reset to 0 and the above rule is applied.
    Since you are not getting a -1 result all should be fine?

Similar Threads

  1. QThread::isRunning returns true after emitting finished signal
    By mentalmushroom in forum Qt Programming
    Replies: 10
    Last Post: 1st August 2012, 06:48
  2. Replies: 1
    Last Post: 29th June 2011, 23:07
  3. QNetworkReply::uploadProgress finishes immediately
    By peppermg in forum Qt Programming
    Replies: 2
    Last Post: 26th March 2010, 17:19
  4. Replies: 1
    Last Post: 23rd January 2010, 22:04
  5. QNetworkReply & delayed readyRead(() signal
    By dmini in forum Qt Programming
    Replies: 1
    Last Post: 6th November 2009, 13:47

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.