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

QTreeView in ExtendedSelection mode scrolls to top if the last item is removed

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 4.7.1
    • 4.7.0
    • Widgets: Itemviews
    • None
    • 6da6b7099d4e0b49329793e4b90703ec3d868048

    Description

      If you run the attached test case, scroll the view to the bottom, click the last item, and click the "remove last item" button, the view scrolls to the top unexpectedly. This did not happen in Qt 4.6.3.

      Interestingly, the bug does not occur in SingleSelection mode (in my test app, you can switch the selection mode using the combo box on top).

      Could be related to commit b72a2bcf8d813ec6b76eb6cc986408c75a1c96bf which changed a lot of code related to removing/inserting items in a QTreeView.

      I'm using the 4.7 branch, commit 2b527006a3e9147a447a08d78004e20a7ac3d17c

      This was reported as a Dolphin bug, see https://bugs.kde.org/show_bug.cgi?id=246997

      Attachments

        1. test.cpp
          3 kB
        2. tst_qtreeview.diff
          1 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            goffart Olivier Goffart (closed Nokia identity) (Inactive)
            freininghaus Frank Reininghaus
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes