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

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

XMLWordPrintable

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

      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

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes