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

TreeView does not show new rows after layoutChanged()

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.10.1
    • Fix Version/s: None
    • Component/s: Quick: Controls 1
    • Labels:
      None
    • Platform/s:
      Linux/X11

      Description

      TreeView should show new rows after layoutChanged() is called. QTreeView, QListView, and ListView do this and the documentation says that using layoutChanged() is a valid way of updating the views after adding rows.

      "This sequence can be used for any structural update in lieu of the more high-level and convenient protected methods."

      http://doc.qt.io/qt-5/model-view-programming.html

      TreeView does not show new rows after this sequence in the model:

      Attached is a demo application that shows that QTreeView, QListView, and ListView update the view but that TreeView does not.

        Attachments

        1. after.png
          after.png
          15 kB
        2. before.png
          before.png
          13 kB
        3. debugtreeview.tar.xz
          2 kB

          Issue Links

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

            Activity

              People

              Assignee:
              qt.team.quick.subscriptions Qt Quick and Widgets Team
              Reporter:
              vandenoever Jos van den Oever
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes