I tested the way of the intermediate button,
but I still have to pressed enter or tab or click sideway after dialog quits in order to get
setModelData called
What I did :
- in createEditor : instanciate a special push button that can carry a QVariant and which clicked() signal is connected to a method of my itemdelegate
- in setEditorData : I put the qvariant onto the button
- in the slot for clicked(), i setup the dialog with the qvariant, exec the dialog
and on accept i copy dialog qvariant to special button, waiting for setModelData
to keep clean and then emitting commitData and closeEditor- in setModelData I call setData with the qvariant on the special button
The problem is my emit of commitData is vain : my setModelData
is called ony when I as a user interact with the table.
I feel likeI am gonna gruik --pig noise-- by keeping the index in the special button and use it to call setData with![]()
Anybody a hint ?
It seems that many things require a user interaction to be taken into account : calling reset from my model isi not enough to have my tableview repainted
Have a nice week end.
Bookmarks