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

ListView currentIndex incorrect if changed from onRowsInserted in the model

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P4: Low
    • None
    • 5.2.1
    • None
    • Ubuntu 13.04 32bits, Qt 5.2.1. Reproduced on Windows 7 64bits too.
      OSX
      5.0.2, 5.3.0
    • macOS

    Description

      When the currentIndex property of a ListView is modified from the onRowsInserted callback of the corresponding model, the resulting value of currentIndex is incorrect.

      See attached file for a simple reproduceable example. Just double-click to insert an element in the model dynamically, and see the currentIndex value of the ListView become wrong.

      Attachments

        1. testListViewModel.qml
          1 kB
          Christophe Chapuis

        Issue Links

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

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              tofe Christophe Chapuis
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes