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

Clarify the documentation regarding QDeclarativeListProperty and ownership

XMLWordPrintable

      The documentation for QDeclarativeListProperty and ownership is not clear, it is implied that the ownership of the contents of this list will be Javascript if the QML calls a function that creates the objects and populates the list that is returned.

      Generally having an example and more clear documentation on how to use this class correctly would be good.

      I have attached the example I used to illustrate this, the fact I have to do:

      myObject.getInfo = [];

      to get it to clear seems to indicate that it is not owned by Javascript.

        1. test.qml
          0.3 kB
        2. main.cpp
          1 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            416365416c Alan Alpert
            andysh Andy Shaw
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes