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

TableView: implement an API to get the delegate item for a certain row/column

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Quick: Other
    • Labels:
      None
    • Technical Risk:
      Normal

      Description

      Currently you need to iterate through the contentItem of the table view to find the delegate items. And you will need to do this if you e.g want to resize a column based on the size of the items. Moreover, since row and column are context properties inside the delegate items, they cannot be queried from the outside. This forces you to create an extra set of properties/copies of the row and column inside the delegate to be used during the iteration.

      So we need an API so that you can e.g call: TableView.itemAt(row, column)

      But note that this needs a documented warning that the called should not store a pointer to the returned item, since it can be destroyed or reused at any time.

      Also: consider a foreachItemInColumn(callbackFunction(item, row, column)

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              richard Richard Moe Gustavsen
              Reporter:
              richard Richard Moe Gustavsen
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes