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

Exposing C++ lists to QML should be documented better

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • P2: Important
    • 5.9.0 Beta 2
    • None
    • Documentation
    • None

    Description

      It needs to be made more obvious which types can be stored in QQmlListProperty. Specifically, this note should be higher up, probably part of the first sentence:

      Note: QQmlListProperty can only be used for lists of QObject-derived object pointers.

      It should be mentioned that the type passed as the template argument when declaring the QQmlListProperty should not be a pointer to the QObject-derived class, but the plain type.

      The above would probably not be necessary if there was an example of usage beyond the Q_PROPERTY definition in the detailed description. Having this example in the See Also section would also help, although that example doesn't go into the details of providing your own append, etc., functions.

      Attachments

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

        Activity

          People

            kdpalara Kavindra Palaraja
            mitch_curtis Mitch Curtis
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes