That delegate uses KExtendableItemDelegate. That means a cell can be expanded. When selected a cell is replaced by a KisShortcutsEditor. When painting the widget KExtendableItemDelegate reparents the widget to the viewport of the itemview it belongs to. The widget is destroyed when the user selects another shortcut or explicitly issues a contractItem event. But when the user clears the model the delegate misses that event and doesn't delete the KShortcutseditor. And remains as a visible artifact in your treeview. Additionally when closing your application you get an assertion failure from KExtendableItemDelegate.