Results 1 to 13 of 13

Thread: How to downloads files?

  1. #1
    Join Date
    Dec 2009
    Location
    Mexico
    Posts
    26
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default How to downloads files?

    I am creating a program; the program should do is downloads Mangas of the web pages of Submanga.
    I was told to wear QNetworkAccessManager:: get but not how to use it.

    I'm basing on the program gestSubmanga what written in Java.

    I've only created the graphical interface and was wondering if someone could help me with the program?
    Attached Files Attached Files

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to downloads files?

    It tells you how to use it in the documentation, including the link you posted.

  3. #3
    Join Date
    Dec 2009
    Location
    Mexico
    Posts
    26
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: How to downloads files?

    The documentation also says: " This class is not part of the Qt Gui Framework Edition" and is the one I'm using.

  4. #4
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to downloads files?

    Then you either need to upgrade to the Full Framework edition, or write the network stuff yourself.

  5. #5
    Join Date
    Dec 2009
    Location
    Mexico
    Posts
    26
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: How to downloads files?

    already solved

    Qt Code:
    1. #include </home/usuario/qtsdk/qt/include/QtNetwork/QNetworkAccessManager>
    To copy to clipboard, switch view to plain text mode 

    buit still do not know how to use this function to downloads files.

  6. #6
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to downloads files?

    You say above that you are using the "Qt Gui Framework Edition" which doesn't support networking, so what does it matter?

    But if you were using the Full Framework Edition, you would use it as stated in the documentation (which includes examples). What bit don't you understand?

  7. #7
    Join Date
    Dec 2009
    Location
    Mexico
    Posts
    26
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: How to downloads files?

    what makes ignorance. to creating a new project, leave it by default, and do no check QNetwork.

    but continuing the theme, do not know one example that demonstrates what i do?

  8. #8
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to downloads files?

    Ok... Lets try this again. Under "Detailed Description" in the documentatio of QNetworkAccessManager there are examples. There are also download manager examples in the Qt distribution which use the same QNetworkAccessManager.

    What part of the example do you not understand?

    And secondly, have you now upgraded from GUI Edition to Full Edition, as the GUI edition does not support QNetworkAccessManager, as also stated in the documentation.

  9. #9
    Join Date
    Dec 2009
    Location
    Mexico
    Posts
    26
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: How to downloads files?

    What part of the example do you not understand?
    example: one paste a link to TextEdit and click the button is given to download and the file downloads.
    As you would copy link to QNetWorkAccessManager?

    And secondly, have you now upgraded from GUI Edition to Full Edition, as the GUI edition does not support QNetworkAccessManager, as also stated in the documentation.
    not if Gui Edition or Full Edition. i download the LGPL to Linux. This

  10. #10
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to downloads files?

    Sounds to me like you want to look at the network/http example, which shows you how to accept a URL, and then download that file by clicking the Download button. Did you view this example?

  11. #11
    Join Date
    Dec 2009
    Location
    Mexico
    Posts
    26
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: How to downloads files?

    Sounds to me like you want to look at the network/http example, which shows you how to accept a URL, and then download that file by clicking the Download button
    yes. actually want to do that.

    Did you view this example?
    which example?

    not very good english, so it makes me a little.

  12. #12
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to downloads files?

    The network/http example. Ie, the 'http' example in the 'network' folder of your Qt installation, in the 'examples' directory.

  13. The following user says thank you to squidge for this useful post:

    Lycus HackerEmo (24th February 2010)

  14. #13
    Join Date
    Oct 2009
    Posts
    37
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11

    Default Re: How to downloads files?

    The http example is using QHttp which is deprecated.
    Look at the download example.
    Disclaimer: Although I work on Qt for Nokia, anything I post here is personal

Similar Threads

  1. Qhttp several downloads
    By cae in forum Qt Programming
    Replies: 2
    Last Post: 30th November 2009, 10:04
  2. Replies: 1
    Last Post: 11th November 2009, 12:22
  3. Replies: 12
    Last Post: 17th June 2009, 05:34
  4. visual studio project files - adding extra files
    By luf in forum Qt Programming
    Replies: 3
    Last Post: 13th June 2008, 21:05
  5. how to save sequences of text files and sound files
    By nagpalma in forum Qt Programming
    Replies: 8
    Last Post: 3rd July 2007, 00:06

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.