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

TreeView does not show new rows after layoutChanged()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.10.1
    • Quick: Controls 1
    • None
    • 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

              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

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes