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

QItemSelectionModel does not emit selectionChanged on row removal (under conditions)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Done
    • Affects Version/s: 5.15.3
    • Fix Version/s: 6.2.0 Alpha
    • Component/s: Core: Item Models
    • Labels:
      None
    • Commits:
      8278879c199ecc9b17a1fd603ecb4a31f5fd6c68 (qt/qtbase/dev)

      Description

      See reproducer in https://codereview.qt-project.org/c/qt/qtbase/+/346525

      Having a QStandardItemModel and a QItemSelectionModel on top of it, removal of a row with selected entries does not always trigger a selectionChanged signal in the QItemSelectionModel.

      The QItemSelectionModel subscribes to the rowsAboutToBeRemoved signal. On row removal, the signal is triggered. The signal handler is called. However, the signal handler QItemSelectionModelPrivate::_q_rowsAboutToBeRemoved decides that the selection was not changed.

        Attachments

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

          Activity

            People

            Assignee:
            andreasbuhr Andreas Buhr
            Reporter:
            andreasbuhr Andreas Buhr
            PM Owner:
            Maurice Kalinowski Maurice Kalinowski
            RnD Owner:
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes