Can a QML app receive QML files through the internet like an HTML app?
-
Aha, wait! I think I found the answer: the QML Loader Element (http://doc.qt.digia.com/qt/qml-loader.html).
I haven't tested yet, but I'm assuming it will let me get QML from any URL on the net.
This is good because then you can easily make a server that serves either HTML or QML using a templating engine so the important data is the same. :D
-
Yep this would work. But feeding live QML code through a web server is certainly not a very safe thing to do. Keep in mind that with most html browsers you are sandboxed. With QML you are most likely not unless you write your own sandbox. I would strongly suggest that you let the server send raw json or xml and that you parse the data on the client side instead. :)
-
That's good info to know.
If my QML app were to @import FileIO 1.0@ as in "this example":http://www.developer.nokia.com/Community/Wiki/Reading_and_writing_files_in_QML, I'd imagine an attacker could intercept and change the QML and/or JavaScript during the internet transaction and wreak havoc.
Suppose the C++ end of my QML app does not contain any of the FileIO modifications like in "that example":http://www.developer.nokia.com/Community/Wiki/Reading_and_writing_files_in_QML. Suppose my app is based strictly on an entry level QML example where the C++ merely implements a QML view. What sort of damage could an attacker do? Another way to ask the same question: What sort of control do I have over the user's system if I start a new QML app in Qt Creator and write strictly QML/JavaScript without writing any C++ code?