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
          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

        Issue Links

          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: