From 5a794a7de0508115efa1ff2b056e3744c8e2afec Mon Sep 17 00:00:00 2001 From: Andrew den Exter Date: Wed, 22 Jun 2011 16:22:48 +1000 Subject: Fix external items not showing in ListView without a transition. Need to set the parentItem() if it's not done by the transition. --- src/declarative/items/qsglistview.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/declarative/items/qsglistview.cpp b/src/declarative/items/qsglistview.cpp index e5b53ea148..8d3ba6dfa4 100644 --- a/src/declarative/items/qsglistview.cpp +++ b/src/declarative/items/qsglistview.cpp @@ -2960,6 +2960,8 @@ void QSGListView::itemsInserted(int modelIndex, int count) transition->addItem(item, item->positionIfMovedTo(pos, true), contentItem()); d->indexesInTransition.insert(item->index); } else { + if (item->item->parentItem() != contentItem()) + item->item->setParentItem(contentItem()); item->setPosition(pos); } added.append(item); -- cgit v1.2.3