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

QTransposeProxyModel. LayoutChanged bug

    XMLWordPrintable

    Details

    • Commits:
      1dcfb09c5bf431bf8b065ac038bd1fc618a68f96 (qt/qtbase/dev) 1693779f05731668d0177d9941a00ed67eba4f20 (qt/qtbase/6.2)

      Description

      QTransposeProxyModel reports incorrect indexes order during layoutAboutToBeChanged/layoutChanged signals pair, when source model is sorted.

      Archive with minimal project, reproducing problem attached.

      QSortFilterProxyModel, used as a source for QTransposeProxyModel, is sorted dynamically and reported correct indexes in layoutAboutToBeChanged/layoutChanged signals pair, but QTransposeProxyModel is not correctly transposed.

      Following application output could be seen:

      ************************
      QModelIndex(1,0,0x7fb660f4b560,QSortFilterProxyModel(0x7fb660f35f20))
      QModelIndex(0,0,0x7fb660f4b560,QSortFilterProxyModel(0x7fb660f35f20))
      QModelIndex(2,0,0x7fb660f4b560,QSortFilterProxyModel(0x7fb660f35f20))
      ************************
      QModelIndex(0,0,0x7fb660f4b560,QTransposeProxyModel(0x7fb660f48720))
      QModelIndex(0,1,0x7fb660f4b560,QTransposeProxyModel(0x7fb660f48720))
      QModelIndex(0,2,0x7fb660f4b560,QTransposeProxyModel(0x7fb660f48720))

      when

      ************************
      QModelIndex(1,0,0x7fb660f4b560,QSortFilterProxyModel(0x7fb660f35f20))
      QModelIndex(0,0,0x7fb660f4b560,QSortFilterProxyModel(0x7fb660f35f20))
      QModelIndex(2,0,0x7fb660f4b560,QSortFilterProxyModel(0x7fb660f35f20))
      ************************
      QModelIndex(0,1,0x7fb660f4b560,QTransposeProxyModel(0x7fb660f48720))
      QModelIndex(0,0,0x7fb660f4b560,QTransposeProxyModel(0x7fb660f48720))
      QModelIndex(0,2,0x7fb660f4b560,QTransposeProxyModel(0x7fb660f48720))

      is expected

        Attachments

        For Gerrit Dashboard: QTBUG-93466
        # Subject Branch Project Status CR V

          Activity

            People

            Assignee:
            VRonin Luca
            Reporter:
            viktor.kolesnyk Viktor Kolesnyk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There is 1 open Gerrit change