×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Apr 2008
    Location
    India / Singapore
    Posts
    549

    File Download from QML

    I understand QML is not a fully functioning language, but I wish to know if I can download and save a file via Javascript in QML.
    If not, can someone point me to a Qt C++ example for the above case ?
    Twitter - manikantan_k
    Just in --

  2. #2
    Super Contributor
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,037

    Re: File Download from QML

    AFAIK thr is no direct API in QML, you can look into the link for example.

  3. #3
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: File Download from QML

    Hello Mani,

    I will point you two solutions here:

    1. You can use javascript XMLHttpRequest class to make http get or post request and using the same you can download any type of data you want. But the problem there can be to save the data which might not be possible in javascript.

    2. You can make a helper class in c++ and download contents using QNetworkAccessManager and save it wherever you want, then you just simply need to expose your c++ class object to QML code which you can do easily using QDeclarativeContext. Please refer this http://doc.qt.nokia.com/4.7/qtbinding.html for more details.

  4. #4
    Registered User
    Join Date
    Apr 2008
    Location
    India / Singapore
    Posts
    549

    Re: File Download from QML

    Cool... Thank You both..
    Twitter - manikantan_k
    Just in --

Similar Threads

  1. Replies: 0
    Last Post: 2011-01-18, 16:17
  2. Download manager hangs during file download on N95
    By ActiveRosh in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2009-10-13, 21:59
  3. Replies: 3
    Last Post: 2008-11-20, 13:57
  4. Replies: 6
    Last Post: 2008-11-15, 11:12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •