How to create editorWidget when delegate is constructed?
Unsolved
General and Desktop
-
@jsulm
What I mean is, in this QSpinBox Delegate example,when we click on particular block in the table , the QSpinBox gets created and as soon as we select some other index, it vanishes.
Is there a way to create a QSpinBox along with the Delegate where as soon as the table appears the spinBox appears too, without us clicking or attempting to edit it ? It should work as it works in the example linked above. -
Hi,
Do you mean that you want the spin box to be shown permanently ?
-
You can try with openPersistentEditor. Note that you will hit a performance penalty if your model has a big number of rows.
-
That is implemented in the delegate createEditor function.