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

Clarify the documentation regarding QDeclarativeListProperty and ownership

    XMLWordPrintable

Details

    Description

      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.

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes