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

Strange animation onCurrentIndexChanged of QML Tumbler

    XMLWordPrintable

Details

    • Windows

    Description

      Reproducer attached. The default setup is a Popup that contains a Tumbler and a Button is opened on clicking the MouseArea. On Popup about to be shown, currentIndex of Tumblr is set to its last index and the last item is centered. And on Button being clicked, currentIndex decrements until it hits 0. Then Popup is closed. So basically, a count down.

      The first run is all good. Popup shows, Tumbler animates counting down from designated "seconds" to "1" and Popup closes on another click. But if one clicks MouseArea again and try another run, the animation from "4" to "3" is ABNORMALLY FAST, like almost instant. it is much faster than the following "2" and "1" and any of animations in the first run. It is true for any following runs. That first animation is always that strangely fast.

      And some observations:
      a). Seems to only be a problem with visibleItemCount: 1. With, for example, visibleItemCount: 3, then animations are normal for all items in all runs.
      b). Move counter.currentIndex = root.seconds; from onAboutToShow to onClicked of Button after popup.close(); and the animation speed issue is gone. Instead, "4" jumps before being brought down from the second run, which is another weird problem.
      c). Dynamic object creation/destruction solves the problem, which is kind of expected since the problem happens only from the second run. Maybe some leftovers break things. This can be proved by commenting out the entire Popup and uncommenting the other onClicked slot of MouseArea (so that "MyPopup" is dynamically created on click and destroys itself onAboutToHide).

      Attachments

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

        Activity

          People

            kwpark Kwanghyo Park
            luqiaochen Luqiao Chen
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes