Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-39529

Enabling Loader to load a string of QML

XMLWordPrintable

      A string of QML can be converted to an object through Qt.createQmlObject. However, the Loader type can only load a URL (QUrl) or a component (QQmlComponent), not an object. As far as I can see, if one would want to sideload a string of QML, the only choices are subclassing Loader or saving the string to a file and using Loader to load that file URL.

      I would thus suggest enabling the Loader to work with strings of QML, e.g. through a new property sourceString.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qtqmlteam Qt Qml Team User
            robbert.s Robbert
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes