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

QML/DOCS ListView.sections documentation has incorrect approach

    XMLWordPrintable

Details

    • All

    Description

      In the documentation of ListView section.delegate there is a code-snipped which is faulty and only works somewhat.

      I expect the example to use the right way.

       

      The section.delegate will get the property 'section' set, just like the listview delegate gets the property 'model' set. Important to note that this can be used anywhere in the delegate.

      The code-snippet under the section.delegate, however, gives the impression it is a property set on the root-item of the delegate.

      It lists the code:
      required property string section
      which, if used, will cause sections to sometimes not get the proper text. In my code the 3rd and 5th sections repeated the 2nd-section text.

      This problem goes away by removing the above line and changing the
      text: parent.section
      to just
      text: section

      Attachments

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

        Activity

          People

            richard Richard Moe Gustavsen
            tomz Tom Zander
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes