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

PathView delegates are not created when model length = 67

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2: Important
    • None
    • 5.15.0
    • None
    • Linux/X11, Windows

    Description

      steps to reproduce:

      1) create model containing 67 items (or 61)

      2) set preferredHighlightBegin = 0, preferredHighlightBegin =0

      3) set highlightMoveDuration = 0

      3) set pathItemCount = 7

      4) use decrementCurrentIndex to scroll

      Code based on pathview-example.qml from distrib is attached.

      Draft analysis:

      errors in operations with floating point numbers in positionOfIndex. Item's position must be >= 1 when item has left the path. But because of using qreal result of positionOfIndex is 0.9999...

      So the condition in refill() "if (pos < 1)" failures which causes the bug.

      Attachments

        1. pathview-example.qml
          9 kB
        2. path2.png
          path2.png
          19 kB
        3. path1.png
          path1.png
          22 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kagro Kaj Grönholm
            alobanov Andrey Lobanov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes