Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Can a QML app receive QML files through the internet like an HTML app?

Can a QML app receive QML files through the internet like an HTML app?

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 2 Posters 2.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    trusktr
    wrote on last edited by
    #1

    For example, can I make a QML app that can receive and render QML files from a URL, behaving similar to an HTML app/browser?

    1 Reply Last reply
    0
    • T Offline
      T Offline
      trusktr
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • J Offline
        J Offline
        Jens
        wrote on last edited by
        #3

        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. :)

        1 Reply Last reply
        0
        • T Offline
          T Offline
          trusktr
          wrote on last edited by
          #4

          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?

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved