[Interest] QItemDelegate with custom edit widget
etienne.sandre at m4x.org
Tue Dec 10 11:19:13 CET 2013
I have a "scientific double spinbox" which works well standalone, when
inserted in dialogs and layouts.
I would like to use it with a custom QItemDelegate for a table view. I
return it with createEditor and also subclassed the setEditorData and
When I double click on the table cell, my widget is created and displayed
correctly, in non-edit mode. Normally, a click on it triggers the edit. But
in the table, the editor disappears when I click it. Any idea why? My
widget handles click events and always accepts the event.
I tested returning a QDoubleSpinBox instead, and this works. Additionally,
it opens in editing state. Why?
I have set my widget focus policy to StrongFocus as suggested in the doc,
but there is very little details about how to implement this.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Interest