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

Creating new items inside a QML-declared function gives an improper context

    XMLWordPrintable

Details

    • 186a38c683cbec6a2a141245d5e428d85c073b8f

    Description

      For code like this:

      Item {
          function createStuff() {
              var comp = createComponent("MyComponent.qml");
              var obj = comp.createObject()
          }
      }
      

      A temporary context is created for the function (see QmlVMEMetaObject), which used by createComponent.

      We should add the ability to flag a context as temporary, and then make use of that knowledge in createComponent.

      Attachments

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

        Activity

          People

            brasser Michael Brasser (closed Nokia identity) (Inactive)
            brasser Michael Brasser (closed Nokia identity) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes