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

ListView/GridView headerItem & footerItem should be writable

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • Icon: Not Evaluated Not Evaluated
    • None
    • None
    • None

      ListView / GridItem (QQuickItemView) header and footer properties have a Component type. This is not consistent with classes from Qt Quick Controls (ApplicationWindow, Page, Dialog) and it's confusing.

      There's not much sense for it to be a Component, since it is always instantiated anyway and you have a single one, unlike delegates.

      Could we make it so that the footerItem property is writable to avoid having to use a Component?

      typical usage: have a TextField as the header for filtering a ListView
      If I want to retrieve the TextField text I have to do like so:

      pattern: listView.footerItem.text
      

      I would like this to be more explicit (and type safe? footerItem is of type Item, it's not supposed to have a text property), like so:

      pattern: mySearchTextFieldId.text
      

      That is currently not possible with a Component.

      Maybe for Qt 7: make header and footer Item and not Component

        For Gerrit Dashboard: QTBUG-117607
        # Subject Branch Project Status CR V

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            grecko Pierre-Yves Siret
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There is 1 open Gerrit change