Details
-
Suggestion
-
Resolution: Done
-
P3: Somewhat important
-
None
-
None
Description
Sometimes it is useful to reuse the same editor widget rather than to create it and initialize it again and again for each editing operation (ie. huge combobox takes long to create, and multiple cells in a table would select from the same dataset, but with different selected index). This can right now not be easily implemented (the combobox case can be realized with an independent model, but no general solution), and since the delegate creates the widget it should also have a chance to use it's own deletion method (the default implementation would use deleteLater).
Solution for now: make a QWidget subclass that the actual editing widget is parented into and out of in the constructor/destructor. Return that QWidget from createEditor.