[Interest] submit policy

Stefan nohoo77 at yahoo.com
Mon May 21 15:15:27 CEST 2012


Hello,

this question is about the submit policy in QDataWidgetMapper.

There is an AutoSubmit, which submits to the itemModel on focus lost.
Also, there is a ManualSubmit, submitting only when called programatically.
I prefer to use the auto submit policy, since I don't want to have an ok 
button on my dialog needing to be pressed in order to make the change 
permanent. I like that the data is changed immediatly.

Unfortunately the data is not being submitted until the user defocuses the currently 
changed widget, which he might or might not. 

Eventually 
he will, one might thinkg, but in my case the connected ItemModel is a 
wrapper to an externally connected device sitting on the users desk, 
which he can access in parallel. In fact he is now checking this device for his currently made change, but since the autosubmit policy didn't fire yet, he gets a 
weird user experience. 

The same problem will occur with 
centralized databases, being accessed by multiple clients. One client 
changes a value in a widget and goes to lunch. The other client still 
sees the old data.

Does anybody know of a 
creative way to come up with a custom submit policy? Like a 
SubmitOnValueChanged ? Or even a "timedelayed submit on value 
changed"-policy ?

Please help
This is bothering me for weeks now and nobody else at google seems to know :)


Thank you for any helpful input
Stefan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120521/cd919fec/attachment.html>


More information about the Interest mailing list