Results 1 to 2 of 2

Thread: Downloading from a clean url

  1. #1
    Join Date
    Feb 2007
    Posts
    24
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Downloading from a clean url

    I'm writing a web client using QUrl and QHttp and I can't figure out how to access the data of a clean url. For instance http://kde.org is a clean url.

    Thanks,
    -Dieter

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Downloading from a clean url

    Maybe this way:
    Qt Code:
    1. QUrl url;
    2. ...
    3. if( url.path().isEmpty() ) {
    4. url.setPath( "/" );
    5. }
    6. ...
    7. http.setHost( url.host() );
    8. http.setPort( url.port( 80 ) );
    9. ...
    10. http.get( url.path(), ... );
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. clean with transparent color
    By Lele in forum Qt Programming
    Replies: 9
    Last Post: 28th October 2007, 13:45
  2. Clean project deletes makefile
    By Djony in forum Qt Programming
    Replies: 2
    Last Post: 7th December 2006, 10:15
  3. nmake clean and qmke
    By mickey in forum Newbie
    Replies: 1
    Last Post: 13th April 2006, 06:59
  4. Obtaining clean (x)html from QTextEdit
    By ccf_h in forum Qt Programming
    Replies: 1
    Last Post: 5th February 2006, 14: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.