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

Tumbler.currentIndex doesn't change when model is statically set

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.12.8, 5.15.0
    • Quick: Controls 2
    • None
    • Linux/X11, Windows

    Description

      When set a static array-based model on Tumbler in Qt Quick Controls 2, its currentIndex doesn't work as user spins the Tumbler; shown value is changed on the screen but currentIndex remains the same.

      Due to lack of test environment I could test only with Windows(Qt 5.15.0) and Ubuntu 20.04(Qt 5.12.8) and the test failed on both, but I'm sure that it would affect all the platforms.

      You can replicate the issue with the attachment. If you change a value in one of the Tumbler it should change currentIndex and show a log to the console(e.g. "year.currentIndex changed". check line 45, 55, 72, and so on) but nothing will be shown on the console, and date(property of this QML component) won't change.

      In this example the only thing where currentIndex is working as expected is day, which updates the model dynamically by Javascript.

      Thank you in advance for your cooperation.

      Attachments

        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
            teminian Robert Teminian
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes