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

ListView: BottomToTop vertical direction removes the transition animation

    XMLWordPrintable

Details

    • 3214689af (dev)

    Description

      When removing an index one by one from a ListView's model, there is an observed difference in behaviour between a TopToBottom and a BottomToTop vertical layout when you remove the very last remaining index. In the former, the remove transition is triggered as normal for the last delegate. In the latter, the delegate just disappears. 

      How to reproduce the issue:

      1. Run the attached example
      2. Press the Remove 0 button a few times slowly enought to allow the transitions and observe the difference between the bottom left and bottom right delegates when there is only one left.
      3. Click the Remove 0 once more and the left one will just suddenly disappear whereas the right one will run its transition. After pressing "Add 0" to put it back, and "Remove 0" to remove it again, the transitions run in both cases.

      There is also some suspicious compiler warnings when building the example:

      Warning: main.qml:94:66: Could not compile binding for onClicked: Cannot generate efficient code for DefineObjectLiteral [compiler]
                      onClicked: listModel.insert(0, { index: 0, text: text })
                                                                       ^^^^
      Warning: main.qml:99:66: Could not compile binding for onClicked: Cannot generate efficient code for DefineObjectLiteral [compiler]
                      onClicked: listModel.insert(3, { index: 3, text: text })
                                                                       ^^^^
      Warning: main.qml:104:38: Could not compile binding for onClicked: Cannot generate efficient code for call to untyped JavaScript function [compiler]
                      onClicked: listModel.remove(0)
                                           ^^^^^^
      Warning: main.qml:109:38: Could not compile binding for onClicked: Cannot generate efficient code for call to untyped JavaScript function [compiler]
                      onClicked: listModel.remove(4)
                                           ^^^^^^
      Warning: main.qml:117:21: Could not compile binding for onClicked: Instruction "generate_DeadTemporalZoneCheck" not implemented [compiler]
                          for(let i=0; i < count; i++)
                          ^^^

      Attachments

        For Gerrit Dashboard: QTBUG-111050
        # Subject Branch Project Status CR V

        Activity

          People

            santhoshkumar Santhosh Kumar Selvaraj
            tuomas.vaarala Tuomas Vaarala
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes