@@ -931,12 +931,17 @@ void ListViewWithPageHeader::onModelUpdated(const QQmlChangeSet &changeSet, bool
931931 const int visibleIndex = remove.index + i - m_firstVisibleIndex;
932932 if (visibleIndex >= 0 && visibleIndex < m_visibleItems.count()) {
933933 ListItem *item = m_visibleItems[visibleIndex];
934− // Pass the section item down if needed
934+ // Pass the section item down if needed i.e. has no sectionItem because
935+ // had same section string (and not because it has no section at all)
935936 if (item->sectionItem() && visibleIndex + 1 < m_visibleItems.count()) {
936937 ListItem *nextItem = m_visibleItems[visibleIndex + 1];
937938 if (!nextItem->sectionItem()) {
938− nextItem->setSectionItem(item->sectionItem());
939− item->setSectionItem(nullptr);
939+ const int modelIndex = remove.index + i;
940+ const QString section = m_delegateModel->stringValue(modelIndex, m_sectionProperty);
941+ if (!section.isEmpty()) {
942+ nextItem->setSectionItem(item->sectionItem());
943+ item->setSectionItem(nullptr);
944+ }
940945 }
941946 }
942947 releaseItem(item);
@@ -1250,6 +1255,18 @@ void ListViewWithPageHeader::layout()
12501255 m_topSectionItem->setY(item->y() - m_topSectionItem->height());
12511256 }
12521257 break;
1258+ } else {
1259+ // Is there no header because it's same section name or because has no section?
1260+ // Because it is because we have no section (header) we still have to push it up
1261+ const QString section = m_delegateModel->stringValue(firstReallyVisibleItem + 1, m_sectionProperty);
1262+ if (section.isEmpty()) {
1263+ if (m_topSectionItem->y() + m_topSectionItem->height() > item->y()) {
1264+ m_topSectionItem->setY(item->y() - m_topSectionItem->height());
1265+ QQmlContext *context = QQmlEngine::contextForObject(item->m_item)->parentContext();
1266+ context->setContextProperty(QLatin1String("heightToClip"), QVariant::fromValue<int>(0));
1267+ }
1268+ break;
1269+ }
12531270 }
12541271 }
12551272 }