January 4, 2011

sathism sathism
Lab Rat
7 posts

File System Access and Http File Download in QML

 

I need to download a file from internet and save it in client’s machine.Is there any way to do this in QML?.
I couldn’t find any example for that in the official documentation.
I don’t want to go for C++ way.

Thanks in Advance.

6 replies

January 4, 2011

Kxyu Kxyu
Lab Rat
145 posts

sathism wrote:

I don’t want to go for C++ way.

sorry to say, but you have to, anyway. QML has no built-in instruments to write files at all

January 4, 2011

ixSci ixSci
Lab Rat
206 posts

sorry to say, but you have to, anyway. QML has no built-in instruments to write files at all

But JavaScript does. And JavaScript is embedded into QML.
I’m not familiar with JavaScript but, sathism, I think JS is the right way to accomplish your task.

January 4, 2011

Kxyu Kxyu
Lab Rat
145 posts

ixSci wrote:

I’m not familiar with JavaScript

that’s the point. if you don’t know concrete way to do it, just don’t say. QML and JavaScript are a whole, and when I said QML, I meant both

January 4, 2011

ixSci ixSci
Lab Rat
206 posts

Kxyu, sorry. You are right it is currently impossible.

January 5, 2011

sathism sathism
Lab Rat
7 posts

I think this is the place where i should look into
http://doc.qt.nokia.com/4.7-snapshot/qml-extending.html [doc.qt.nokia.com]

August 1, 2011

hamishwillee hamishwillee
Lab Rat
17 posts

Well, it was done in the getting started example: http://doc.qt.nokia.com/4.7/gettingstartedqml.html

This [blogs.kde.org] example uses PySide to expose a standard directory model to the QML. Not sure if similar is possible in C++

Best of all perhaps: http://doc.qt.nokia.com/4.7/src-imports-folderlistmodel.html

 
  ‹‹ Javascript constants not allowed in models      Slow schedule, how to speed it up? ››

You must log in to post a reply. Not a member yet? Register here!