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

Enabling Loader to load a string of QML

    XMLWordPrintable

Details

    Description

      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.

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes