+ header->setRole(model()->sortRole());
+
+ header->show();
+}
+
+void KItemListView::updateGroupHeaderLayout(KItemListWidget* widget)
+{
+ KItemListGroupHeader* header = m_visibleGroups.value(widget);
+ Q_ASSERT(header);
+
+ const int index = widget->index();
+ const QRectF groupHeaderRect = m_layouter->groupHeaderRect(index);
+ const QRectF itemRect = m_layouter->itemRect(index);
+
+ // The group-header is a child of the itemlist widget. Translate the
+ // group header position to the relative position.
+ const QPointF groupHeaderPos(groupHeaderRect.x() - itemRect.x(),
+ - groupHeaderRect.height());
+ header->setPos(groupHeaderPos);
+ header->resize(groupHeaderRect.size());