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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 6.2.0 Alpha
    • 5.15.3
    • Core: Item Models
    • None
    • 5
    • 8278879c199ecc9b17a1fd603ecb4a31f5fd6c68 (qt/qtbase/dev)
    • Qt6_Foundation_Sprint 33

    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

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

        Activity

          People

            andreasbuhr Andreas Buhr
            andreasbuhr Andreas Buhr
            Maurice Kalinowski Maurice Kalinowski
            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