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

postionViewAtIndex duplicates items in the ListView

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.6.0 RC
    • 5.2.0, 5.2.1, 5.3.0 RC1
    • None
    • any

    Description

      Using 'ListView::positionViewAtIndex' to scroll to the position of an item that is about to be inserted duplicates the item in the view.

      I have attached a repro that demonstates the bug. When you click it will insert an item into the ListModel and also has a onRowsAboutToBeInserted that scrolls to the position the item will appear (onRowsInserted demonstrates the same behaviour).

      Manually scrolling away from the item and back again will remove the duplicate from the view (I'm guessing as the delegates are deleted and recreated).

      Attachments

        1. demo.PNG
          12 kB
          George Pollard
        2. main.qml
          0.9 kB
          George Pollard
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            aalpert Alan Alpert
            porges George Pollard
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes