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

TreeView does not show new rows after layoutChanged()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 5.10.1
    • Quick: Controls 1
    • None
    • Linux/X11

      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.

        1. after.png
          15 kB
          Jos van den Oever
        2. before.png
          13 kB
          Jos van den Oever
        3. debugtreeview.tar.xz
          2 kB
          Jos van den Oever
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:

                There are no open Gerrit changes