Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.15.1, 6.2.2
-
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:
- run the example
- click the remove button to remove model data in Repeater
- click the add button to add model data
- then, we cannot see the PathView Item
- 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
- resulted from
-
QTBUG-51078 Use of Item obligatory in SwipeView?
- Closed
-
QTBUG-51669 QQC2: SwipeView is not working as expected
- Closed
- mentioned in
-
Page Loading...