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

TableView rebuilds the entire table when a single row is added/removed

    XMLWordPrintable

Details

    • All, Windows

    Description

      Summary
      When a single row is added/removed, all delegates are destroyed or pooled. This makes it impossible to meaningfully use the TableView.pooled() and TableView.reused() signals.

       

      Original report
      When adding or removing rows or columns from a QML TableView, there are many odd, seemingly random, effects with regard to volatile state data e.g. animation and mouse states. 

      Qt docs on TableViews offer what is paramount to a disclaimer about this.  So, clearly this a long known issue. 

      The recommended "solution" is to make use of onPooled and onReused slots, or to disable the caching mechanism entirely by setting `reuseItems` to false.  But, these solutions are not sufficient, and still force one into a great deal of work and the invention of various kludges.

      I have attached a simple project which demonstrates some of these problems, along with more extended descriptions and thoughts on the matter.

      Attachments

        Issue Links

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

          Activity

            People

              richard Richard Moe Gustavsen
              tboyle Tim Boyle
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes