I have a custom delegate and connected the closeEditor(QWidget*, QAbstractItemDelegate::EndEditHint) to a slot. In this slot I call the signal commitData(widget) and would expect that after closing the editor it would also loose focus and the editor widget would get distroyed.

For some reason I first have to click outside somewhere in order for the destructor to get called.

How can I force the destruction of the editor widget and loose focus?

Thanks