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

PathView item does not appear in certain circumstance

    XMLWordPrintable

Details

    • e10de033f4 (qt/qtdeclarative/dev) 32abff8e5d (qt/qtdeclarative/6.2) c98bf38c9d (qt/qtdeclarative/6.3) 32abff8e5d (qt/tqtc-qtdeclarative/6.2) c98bf38c9d (qt/tqtc-qtdeclarative/6.3) e10de033f4 (qt/tqtc-qtdeclarative/dev) 32abff8e5d (qt/qtdeclarative/6.2.4)

    Description

      PathView item does not appear in certain circumstance.

      Please see the attached example for more details. (main.qml)

       

      In this example, there is Repeater and PathView as contentItem in SwipeView.
      Issue occurs when Repeater generate items for the PathView in certain circumstance.
       

      How to repreduce:

      1. run the example
      2. click the remove button to remove model data in Repeater 
      3. click the add button to add model data 
      4. then, we cannot see the PathView Item
      5. after flicking the PathView, item appears.

       

      Just for the test, I modified as below and attached example works fine.

      shko@shko ~/work/qt_src/qt5/qtdeclarative ((HEAD detached at 02c499996b))$ git diff .
      diff --git a/src/quick/items/qquickpathview.cpp b/src/quick/items/qquickpathview.cpp
      index 996db7af8e..ab1d6afcb5 100644
      --- a/src/quick/items/qquickpathview.cpp
      +++ b/src/quick/items/qquickpathview.cpp
      @@ -430,8 +430,10 @@ void QQuickPathViewPrivate::updateItem(QQuickItem *item, qreal percent)
           if (!path)
               return;
           if (QQuickPathViewAttached *att = attached(item)) {
      -        if (qFuzzyCompare(att->m_percent, percent))
      +        if (qFuzzyCompare(att->m_percent, percent)) {
      +            QQuickItemPrivate::get(item)->setCulled(percent >= 1);
                   return;
      +        }
               att->m_percent = percent;
               const auto attributes = path->attributes();
               for (const QString &attr : attributes)
        

      Attachments

        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
              seokhako Seokha Ko
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: