Results 1 to 3 of 3

Thread: QNetorkAccessManager synchronus download

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2008
    Posts
    9
    Thanks
    9
    Platforms
    Unix/X11 Windows

    Question QNetorkAccessManager synchronus download

    My task is to download a file and then process it right away. Of course it does not work with QNetworkAccessManger asynchronous API. Is it possible to make it synchronous? I'm thinking of using QThread to do this. But is there any other easier option?

  2. #2
    Join Date
    Jul 2009
    Location
    Enschede, Netherlands
    Posts
    462
    Thanked 69 Times in 67 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QNetworkAccessManager synchronous download

    As far as I know you can just wait for the download to finish without having to create a separate thread. You connect to the finished() signal and then process the data you received.

    Just take a good look at the example given in the detailed description of the QNetworkAccessManager doc.

  3. The following user says thank you to franz for this useful post:

    s410i (2nd August 2009)

  4. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QNetorkAccessManager synchronus download

    You can use the approach mentioned in this article: [wiki]Keeping the GUI Responsive[/wiki]
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. QTCPSocket - Download Speed
    By tntcoda in forum Qt Programming
    Replies: 2
    Last Post: 24th May 2009, 13:47
  2. Download Manager Like IDM(Internet Download Manager)
    By sathiskumarmsk in forum Qt Programming
    Replies: 1
    Last Post: 27th July 2008, 15:52

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.