Results 1 to 3 of 3

Thread: QHttp::dataSendProgress(int, int) signal giving the same value twice

  1. #1
    Join Date
    Feb 2009
    Posts
    79
    Thanks
    11
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default QHttp::dataSendProgress(int, int) signal giving the same value twice

    Hi,
    I have set up my http request fine, now I want to set up a progressbar giving info to the user.

    I connected the QHttp::dataSendProgress(int,int) signal to my gui class.

    But the two parameters always have the *same* value, eg.

    If actual contentLength is 68888, QHttp emits

    dataSendProgress( 69064 , 69064 )
    dataSendProgress( 69115 , 69115 )

    Further, I am not able to calcualte this somehow else, since the values being emitted always get slightly larger than requestHeader.contentLenght().

    I am still running Qt 4.5.2 on Windows.

    Thanks in advance,
    Oliver

  2. #2
    Join Date
    Feb 2009
    Posts
    79
    Thanks
    11
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QHttp::dataSendProgress(int, int) signal giving the same value twice

    hmmm, no answer... maybe some admin could move this thread to the qt programming forum?
    Thanks in advance,
    Oliver

  3. #3
    Join Date
    Jan 2010
    Posts
    73
    Thanks
    6
    Thanked 8 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QHttp::dataSendProgress(int, int) signal giving the same value twice

    My understanding is that the amount of data is not always known. The content length is taken from the header. I believe that the header can report the file size, or force the user to download the entire message body to determine the size. See section 4.4 here (http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html ).

    That said, I do not know if what you are seeing is a bug, or because of that.

Similar Threads

  1. OpenCASCADE sample for qt is giving problem
    By sujan.dasmahapatra in forum Qt Programming
    Replies: 1
    Last Post: 1st December 2009, 10:02
  2. giving main window a name?
    By oji in forum Qt Programming
    Replies: 2
    Last Post: 16th November 2009, 11:13
  3. Replies: 1
    Last Post: 28th December 2008, 20:13
  4. QHttp::dataSendProgress transfer speed Kb sec.
    By patrik08 in forum Qt Programming
    Replies: 14
    Last Post: 6th March 2007, 23:34
  5. Suggestions in giving to my application a cool look
    By SkripT in forum Qt Programming
    Replies: 8
    Last Post: 2nd May 2006, 18:30

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
  •  
Qt is a trademark of The Qt Company.