@@ -280,7 +280,7 @@ void ListViewWithPageHeader::setSectionDelegate(QQmlComponent *delegate)
280280
281281 m_sectionDelegate = delegate;
282282
283− m_topSectionItem = getSectionItem(-1, QString());
283+ m_topSectionItem = getSectionItem(QString());
284284 m_topSectionItem->setZ(3);
285285 QQuickItemPrivate::get(m_topSectionItem)->setCulled(true);
286286
@@ -651,17 +651,17 @@ QQuickItem *ListViewWithPageHeader::getSectionItem(int modelIndex, bool alreadyI
651651 }
652652 }
653653
654− return getSectionItem(modelIndex, section);
654+ return getSectionItem(section);
655655}
656656
657−QQuickItem *ListViewWithPageHeader::getSectionItem(int modelIndex, const QString §ionText)
657+QQuickItem *ListViewWithPageHeader::getSectionItem(const QString §ionText)
658658{
659659 QQuickItem *sectionItem = nullptr;
660660
661661 QQmlContext *creationContext = m_sectionDelegate->creationContext();
662662 QQmlContext *context = new QQmlContext(creationContext ? creationContext : qmlContext(this));
663663 context->setContextProperty(QLatin1String("section"), sectionText);
664− context->setContextProperty(QLatin1String("delegateIndex"), modelIndex);
664+ context->setContextProperty(QLatin1String("delegateIndex"), -1);
665665 QObject *nobj = m_sectionDelegate->beginCreate(context);
666666 if (nobj) {
667667 QQml_setParent_noEvent(context, nobj);