Results 1 to 3 of 3

Thread: Problem with downloading a webpage

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2009
    Location
    Kraków, Poland
    Posts
    23
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60

    Default Problem with downloading a webpage

    Hi again,
    I want to download source code from a webpage - I've got following code:

    Qt Code:
    1. QHttp * http;
    2. QFile * file;
    3. file = new QFile("something.txt");
    4.  
    5. QUrl url("SomeUrl");
    6. http = new QHttp;
    7. http->setHost(url.host(), url.port(80));
    8. http->get(url.path(), file);
    To copy to clipboard, switch view to plain text mode 

    Everything compiles well, but my file is sometimes empty or it has not whole webpage code, what should I do?
    Last edited by Fenix Voltres; 25th June 2009 at 17:45.

Similar Threads

  1. QHTTP POST problem
    By oscar in forum Qt Programming
    Replies: 5
    Last Post: 10th October 2009, 19:58
  2. QHttp proxy problem
    By andre.rigon in forum Qt Programming
    Replies: 2
    Last Post: 28th September 2008, 21:19
  3. QHttp download file problem.
    By fengtian.we in forum Qt Programming
    Replies: 12
    Last Post: 12th June 2007, 09:39
  4. QProcess problem in accessing stdout
    By aruna in forum Qt Programming
    Replies: 1
    Last Post: 19th April 2006, 17:56
  5. Replies: 16
    Last Post: 7th March 2006, 15:57

Tags for this Thread

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.